# -*- coding: utf-8 -*- s = list(input()) walk = 1 for i in range(len(s)): if s[i] == "L": walk = walk * 2 else: walk = walk * 2 + 1 print(walk)