using System; using System.Collections.Generic; using System.Linq; namespace No104 { class MainClass { private static long LeftPosition(int length) { long index = 1; for (int i = 0; i < length; i++) { index *= 2; } return index; } public static void Main (string[] args) { var s = Console.ReadLine (); if (s.Length == 0) { Console.WriteLine ("1"); return; } var leftPosition = LeftPosition (s.Length); var length = leftPosition / 2L; for (int i = 0; i < s.Length; i++) { if (s [i] == 'R') { leftPosition += length; } length /= 2L; } Console.WriteLine (leftPosition.ToString()); } } }