# -*- coding: utf-8 -*- STR = raw_input() Slist = list(STR) cnt = 1 for LR in Slist: cnt *= 2 if LR == "R": cnt += 1 print cnt