#include #define pb push_back #define FOR(i, a, b) for(int i = a; i < b; i++) //#define FOR(i, a) FOR(i, 0, a) #define st first #define nd second //#pragma GCC optimize ("Ofast") //#pragma GCC target("sse, sse2, sse3, sse4, popcnt, abm, mmx, avx, time=native") using namespace std; typedef long long ll; typedef long double ld; typedef pair pii; typedef pair pll; typedef vector vi; typedef vector vll; int main() { ios_base::sync_with_stdio(0); string s; cin>>s; int n = s.length(); int res = 0; //cout<= 0 && s[zero - i] == '1'){ for(int j = 0; j < n; j++){ if(s[j] == '1' && j+i < n && s[j+i] == '0'){ _res++; } } if(_res > _res_max){ _max = i; _res_max = _res; } } } for(int i=n-1; i>=0; i--) { if( i + _max < n && s[i] == '1' ) s[i+_max] = '1'; } } //cout<