#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); string S; cin >> S; int ans = 0; for(int i = 0; i < (1 << S.size()); i++) { bool flag = true; int a = 0,b = 0,c = 0; for(int j = 0; j < S.size(); j++) { if(1 & (i >> j)) { if(S[j] == 'l' || S[j] == 'o') { b++; } else if(S[j] == 'a' || S[j] == 's') { c++; } else { flag = false; } } else { a++; } } if(a && b && c && flag) ans++; } cout << ans << endl; }