#include int main(){ char c; int i = 1; scanf("%c", &c); while(c != '\n'){ i = i*2 + (c=='L'?0:1); scanf("%c", &c); } printf("%d\n", i); return 0; }