#include #include int main() { int n = 1, i = 0; char s[30]; s[0] = '\0'; gets(s); while (s[i] != '\0') { n *= 2; if (s[i] == 'R') n++; i++; } printf("%d\n", n); return EXIT_SUCCESS; }