#include using namespace std; #define all(v) v.begin(),v.end() using ll = long long; using ull = unsigned long long; using vll=vector; using P = pair; int main(){ string S; cin>>S; ll N=S.size(); char l='b',r='c',u='c'; ll lr=0,ud=0; map mp; mp[make_pair(0,0)]++; for(int i=0;i