#include using namespace std; int main(void){ int n; cin >> n; vector onCell(n); for(int i=0; i>j)) == 0x01) { bits++; } } if(point + bits < n && !onCell[point+bits]) { point += bits; result++; } else if(point + bits == n) { result++; cout << result << endl; return 0; } else if(point + bits > n && !onCell[point+bits]) { point -= bits; result++; } else { break; } } cout << "-1" << endl; return 0; }