#include using namespace std; int main() { string s; cin >> s; vector v(8); int b; bool c1, c2, c3; int ans = 0; bool imp; for(int i = 0; i < 256; i++) { b = i; for(int j = 0; j < 8; j++) { if(b & 1) v[j] = 1; else v[j] = 0; b >>= 1; } c1 = false; c2 = false; c3 = false; imp = false; for(int j = 0; j < 8; j++) { if(v[j] == 0) c1 = true; else { if(s[j] == 'l' || s[j] == 'o') c2 = true; else if(s[j] == 'a' || s[j] == 's') c3 = true; else { imp = true; break; } } } if(imp) continue; if(c1 && c2 && c3) ans++; } cout << ans << endl; return 0; }