#include using namespace std; using ll = long long; using ld = long double; using vll = vector; using vvll = vector>; using vs = vector; #define lln \ ll n; \ cin >> n; #define REP(i, n) for (long long i = 0; i < n; i++) #define REP2(i, s, e) for (long long i = s; i < e; i++) #define UNIQUE_VECTOR(v) v.erase(unique(v.begin(), v.end())) ll gcd(ll x, ll y) { return (x % y) ? gcd(y, x % y) : y; } ll lcm(ll x, ll y) { return x / gcd(x, y) * y; } int main() { string s; cin >> s; ll cnt1 = 0, cnt2 = 0, cnt3 = 0; REP(i, 8) { if (s[i] == 'o' || s[i] == 'l') { cnt1++; } else if (s[i] == 'a' || s[i] == 's') { cnt2++; } else { cnt3++; } } ll _1 = 1, _2 = 1, _3 = 1; REP(i, cnt1) { _1 *= 2; } REP(i, cnt2) { _2 *= 2; } if (cnt3) _3 = 0; cout << max((ll)0, (_1 - 1) * (_2 - 1) - _3) << endl; }