#include int main(void){ char s[1000]; scanf("%s",s); long long int ans = 1; if(s[0]=='\n'){printf("1\n");return 0;} for(int i=0;s[i]!='\n';i++){ if(s[i]=='L'){ans = ans*2;} else{ans = ans*2+1;} } printf("%lld\n",ans); }