众所周知,lgn=d1\lfloor\lg n\rfloor=d-1,其中 ddnn 的数字位数。

#include <bits/stdc++.h>
using namespace std;
int main()
{
	freopen("log.in", "r", stdin);
	freopen("log.out", "w", stdout);
	int cnt = 0;
	char c = getchar();
	while(c != EOF) cnt++, c = getchar();
	printf("%d", cnt - 1);
	return 0;
}