#B3884. Concatenated Number Length
Concatenated Number Length
Concatenated Number Length
Given a positive integer n, form a new number by concatenating n with \(\lfloor n/2 \rfloor\), and then repeatedly appending \(\lfloor \text{current}/2 \rfloor\) (where current is the last appended number) to its right, until the appended number is 0. Note that the final 0 is not appended.
Output the total number of digits in the resulting concatenated number.
inputFormat
The input consists of a single positive integer n.
outputFormat
Output the length (i.e. the number of digits) of the final concatenated number.
sample
7
3