#include #include using namespace std; #define INT(n) ((n)-'0') int main() { string str; while( getline(cin,str) ) { if (str[str.length()-1] == '0') { str[str.length()-1] = '1'; } else { if ((str[str.length()-1])%2) { string s = "00"; s.append(str); str = s; } else { string s = "0"; s.append(str); str = s; } string s1, s2; str[str.length()-1] = '0'; for( int i = str.length()-2; i >= 0; i-=2 ) { if (str[i-1] == '0' && str[i] == '0') { str[i-1] = '1'; str[i] = '1'; break; } if (str[i-1] == '1' && str[i] == '1') { str[i-1] = '1'; str[i] = '0'; break; } if (str[i-1] == '0' && str[i] == '1') { str[i-1] = '0'; str[i] = '0'; break; } if (str[i-1] == '1' && str[i] == '0') { str[i-1] = '0'; str[i] = '1'; } } } int flag = 0; for(int i =0; i