/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: clockwork.cpp * Author: cteam047 * * Created on December 2, 2018, 9:50 AM */ #include #include #include #include using namespace std; /* * */ int main(int argc, char** argv) { string sr = ""; cin >> sr; int gM = 0; if(sr[0] == '0'){ cout << -1< gM){ gM = M; } continue; } k = M = 0; while (k != 1){ k = array[0] / 2; if(array[0] % 2 != 0){ k++; } array[0] -= k; M++; } k = array[0] / 2; if(array[0] % 2 != 0){ k++; } array[0] -= k; M++; array[0] = array[1] = 0; if(M > gM){ gM = M; } } } cout << gM << endl; return 0; }