#include using namespace std; int main() { string S; cin >> S; string S2, T; for (int i = 0; i < 8; i++) { if (S[i] == 'l' || S[i] == 'o' || S[i] == 'a' || S[i] == 's') { T.push_back(S[i]); } else { S2.push_back(S[i]); } } int c1 = (int)S2.size(); map mp; mp['l'] = '1'; mp['o'] = '0'; mp['a'] = '@'; mp['s'] = '$'; int ans = 0; for (int i = 0; i < (1 << (int)T.size()); i++) { string T2; for (int j = 0; j < (int)T.size(); j++) { if (i & (1 << j)) { T2 += T[j]; } else { T2 += mp[T[j]]; } } int c2 = 0, c3 = 0, c4 = 0; for (auto c : T2) { if ('a' <= c && c <= 'z') { c2++; } else if ('0' <= c && c <= '9') { c3++; } else { c4++; } } if (c1 + c2 > 0 && c3 > 0 && c4 > 0) { ans++; } } cout << ans << endl; return 0; }