#include #include using namespace std; int main() { string inputString; cin >> inputString; int x = 0; int maxZeros = 0; for ( int position = 1; position < inputString.size(); position++ ) { if( inputString[position] == '1' ) { int result = position-x-1; if ( maxZeros < result ) maxZeros = result; x = position; } } cout << ceil( maxZeros/2.0 ); return 0; }