r = list(input()) d = 1 for x in r: d *= 2 if x=='R': d += 1 print(d)