using System.Collections.Generic; using System; using System.Linq; using System.Drawing; namespace yukicoder { class Program { static void Main(string[] args) { string S = Console.ReadLine(); string[] str = new string[S.Length]; int num = 1; for (int i = 0; i < S.Length; i++) { str[i] = S.Substring(i, 1); } for(int j = 0; j < str.Length; j++) { if(str[j] == "L") { num = num * 2; } else if (str[j] == "R") { num = (num * 2) + 1; } } Console.WriteLine(num); } } }