# coding:utf-8 current = 1 for i in input().rstrip(): current *= 2 if i == 'R': current += 1 print(current)