#include #include int main() { int kokudou=1; int i; char c; while(1){ scanf("%c",&c); if(c=='L'){ kokudou = kokudou*2; } else if(c=='R'){ kokudou = kokudou*2 +1; } else{ break; } } printf("%d\n",kokudou); return 0; }