#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); string S; /* cin >> S; */ getline(cin, S); int res = 1; for (auto s : S) { if (s != 'R' && s != 'L') break; res *= 2; if (s == 'R') res++; } cout << res << '\n'; return 0; }