#include int main(){ int i,road=1; char c[30]; gets(c); while(c[i]!='\0'){printf("*"); if(c[i]=='L')road=road*2; else road=road*2+1; i++; } printf("%d",road); }