S = list(input()) k = 1 for i in S: k = k * 2 if i == 'R': k += 1 print('{}'.format(k))