#include "iostream" using namespace std; char letter[50]; int ans = 1; int main() { cin >> letter; for (int i = 0; letter[i] == 'L' || letter[i] == 'R'; i++) { if (letter[i] = 'L')ans *= 2; else ans = ans * 2 + 1; } cout << ans << "\n"; }