You are on page 1of 1

using namespace std;

#include <iostream>
#include <string>
int main()
{
string number;
int count = 0;
bool start_count = false;
getline(cin, number);
for (int step = number.size() - 1; step > 0; step--) {
if (number[step] != '0') {
start_count = true;
}
if (start_count == true && number[step] == '0') {
count++;
}
}
cout << count;
return 0;
}

You might also like