Digit Counter
You are given a non-negative integer N. Find and print the number of digits present in N.
The number 0 contains one digit.
Input
The input contains one integer N.
Output
Print the number of digits in N, without labels or trailing spaces.
Example 1:
Input:
12345
Output:
5
Explanation:
12345 contains five digits.
Example 2:
Input:
0
Output:
1
Explanation:
0 is treated as a one-digit number.
Now Your Turn!
Pick the correct output for the given inputInput:
987654
Still unsure what the problem is asking ?
Let’s go through a few more examples, step by step, to make it clearer.
Constraints:
- 0 <= N <= 1000000000