import std.stdio; import std.string; import std.conv; void main(){ int now = 1; foreach(choice; readln.chomp) if(choice == 'L') now = now * 2; else now = now * 2 + 1; now.writeln; }