$\because \left \lfloor lg\ n\right \rfloor = len(n)-1$

 code:\therefore \ code:

#include<bits/stdc++.h>
using namespace std;
int main(){
    freopen("log.in","r",stdin);//文件读取
    freopen("log.out","w",stdout);//文件写入
    char a=getchar();//获取一个字符
    int ans=-1;//之所以ans初始值为-1,是因为答案是len(n)-1
    while(a!=EOF){//若a为EOF就不是数字了
        ans++;//因为a还是数字所以加上1
        a=getchar();//获取一个字符
    }
    cout<<ans;//输出
    fclose(stdin);//fclose好习惯
    fclose(stdout);//fclose好习惯
    return 0;//return好习惯
}