var s = stdin.readLine res = 1 for e in s: res *= 2 if e == 'R': res += 1 echo res