#include #include int main() { std::string str; std::getline(std::cin, str); int road = 1; for (int i = 0; i < str.length(); i++) { if (str[i] == 'L') { road *= 2; } else { road = road * 2 + 1; } } std::cout << road << std::endl; return 0; }