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