<code lang="cpp">
#include <iostream>
using namespace std;
int main {
//setlocale(LC_CTYPE,"rus");
int a, k, d, ck;
int d = 10;
cin >> a;
for (k; k <= 9; k++) {
if (a % d != 0) {
ck = ck + 1;
d = d * 10;
}
else {
ck = k;
k = 9;
}
}
system("pause");
return 0;
}
</code>