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