using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace yuki { class Program { static void Main(string[] args) { char[] S = Console.ReadLine().ToCharArray(); int r = 1; foreach (var c in S) { if (c == 'L') r *= 2; else r = r * 2 + 1; } Console.WriteLine(r); } } }