Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/rekursiya-raqamlar-soni

Number of digits

Easy 1000 ms 64 MB 24%
Share

You are given a positive integer $n$. Using a recursive function, find how many digits $n$ has.

Recursive step: each time divide $n$ by $10$ and increase the digit count by $1$.

Each call drops the last digit; the number of calls gives the number of digits

Input

One line with a positive integer $n$ ($1 \le n \le 10^9$).

Output

The number of digits of $n$.

Note

$1 \le n \le 10^9$

Examples

Input #1
452
Output #1
3
Input #2
1000000
Output #2
7

Sign in to submit a solution

Signing up is free and takes a minute.