var bin = "1"; let inpt = readLine()!; for c in inpt { if(c=="L") { bin+="0"; } else { bin+="1"; } } let ans = Int(bin, radix:2)!; print(ans);