// No.104 国道 // https://yukicoder.me/problems/no/104 // #include using namespace std; unsigned int solve(string &S); int main() { string S; cin >> S; unsigned int ans = solve(S); cout << ans << endl; } unsigned int solve(string &S) { unsigned int road_num = 1; for (char s: S) { if (s == 'L') road_num *= 2; else road_num = road_num * 2 + 1; } return road_num; }