#include #define FOR(i, n) for(int i = 0; i < (n); ++i) #define REP(i, a, b) for(int i = (a); i < (b); ++i) #define TRAV(i, a) for(auto &i : (a)) #define SZ(x) ((int)(x).size()) #define X first #define Y second #define PR std::pair #define MP std::make_pair typedef long long ll; typedef std::vector VI; typedef std::pair PII; int main(){ std::ios_base::sync_with_stdio(false); std::cin.tie(0); std::string s; std::cin >> s; int max = 0; int have = 0; TRAV(i, s){ if(i == '1') max = std::max(max, have), have = 0; else have++; } std::cout << (max+1)/2 << "\n"; return 0; }