using System; using System.IO; using System.Linq; using System.Collections; using System.Collections.Generic; using System.Numerics; using System.Diagnostics; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; using static System.Math; using static System.Console; namespace yukicoder { class Program { static void Main() { var s = Console.ReadLine(); var cnt = 1; for (var i = 0; i < s.Length; i++) { if (s[i] == 'L') { cnt *= 2; } else { cnt = cnt * 2 + 1; } } Console.WriteLine(cnt); } } }