#!/usr/bin/env python indat = list(input().strip()) ans = 1 for s in indat: if s == 'L': ans = ans * 2 elif s == 'R': ans = ans * 2 +1 print(ans)