#include <iostream>
#include <string>
#include <cctype>
int main() {
std::string num;
std::cin >> num;
if (ispunct(num.front())) num.erase(0, 1);
while (num.front() == '0') num.erase(0, 1);
const auto length = num.length();
std::cout << length << '\n';
}