#include using namespace std; typedef long long LL; int main() { // 1. 入力情報取得. string S; cin >> S; // 2. 国道推定. // 左に分岐 … 2倍, 右に分岐 … 2倍 プラス 1 で考える. LL ans = 1LL; for(int i = 0; i < S.size(); i++){ if(S[i] == 'L') ans *= 2; else ans *= 2, ans++; } // 3. 後処理. cout << ans << endl; return 0; }