#include #include int main() { std::string s; std::cin >> s; int digit = 0; int symbol = 0; for(const auto& c : s) { if(c == 'l' || c == 'o') digit++; if(c == 'a' || c == 's') symbol++; } int ds = 1 << (digit + symbol); int d_only = 1 << digit; int s_only = 1 << symbol; if(digit && symbol) std::cout << (ds - d_only - s_only + 1) << std::endl; else std::cout << 0 << std::endl; }