#include using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); char ch = 0; int count_of_zeros; int days = 0; int ret = EOF; while(ch != EOF && ch != '\n'){ ch = (char)getchar(); if( ch == '0'){ count_of_zeros++; } else{ days = max(days, (count_of_zeros+1) / 2); count_of_zeros = 0; } } cout << days << endl; return 0; }