#include int main() { char s[100]; while (fgets(s, 100, stdin)) { unsigned res=1; for(int i=0;s[i]>'A';++i) { res*=2; if (s[i]=='R') ++res; } printf("%u\n", res); } }