using System; using System.Collections.Generic; using System.Linq; namespace Test { class Program { static void Main(string[] args) { string s = Console.ReadLine(); long ret = 1; for (int i = 0; i < s.Length; i++) { ret *= 2; if (s[i] == 'R') ret++; } Console.WriteLine(ret); } } }