let S = readLine() var n = 1 for i in S!{ n = 2 * n + (i == "R" ? 1 : 0) } print(n)