#include #include using namespace std; int main(){ string S; cin>>S; int x=0,y=0,right=0,left=0; while(x==0){ if(S[y]=='('){ y++; }else if(S[y]=='#'){ x=1; }else if(S[y]=='^'){ left++; y+=5; }else{ right++; y+=5; } } cout<