s = io.read() n = string.len(s) a = 1 for i = 1, n do aa = string.sub(s, i, i) a = a * 2 if(aa == "R") then a = a + 1 end end print(a)