#include #include #include #include #include #include using namespace std; #define int long long #define endl "\n" const long long INF = (long long)1e18; const long long MOD = 1'000'000'007; string yn(bool f){return f?"Yes":"No";} string YN(bool f){return f?"YES":"NO";} signed main(){ // cin.tie(0); // ios::sync_with_stdio(false); // cout< con; vector> dp; cin>>N; N = "0" + N; con.resize(N.size()+2, 0); for(int i = N.size()-1; i >= 0; i--){ if(i == N.size()-1){ } else { if(N[i] != N[i+1]){ con[i] = 0; } else { con[i] = con[i+1] + 1; } } } // for(int i = 0; i < N.size(); i++){ // cout<<"i = "<(2, INF)); // cout<<"B"<= 0; i--, j++){ // cout< "<