let s = readLine stdin

var n = 1

for c in s:
  n *= 2
  if c == 'R': n += 1

echo n