#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); string s; cin >> s; int n = s.size(); set st; for (int bit = 0; bit < (1 << n); bit++) { string t = s; for (int i = 0; i < n; i++) { if ((bit >> i) & 1) { if (t[i] == 'l') { t[i] = '1'; } else if (t[i] == 'o') { t[i] = '0'; } else if (t[i] == 'a') { t[i] = '@'; } else if (t[i] == 's') { t[i] = '$'; } } } bool ok = true; if (t.find('1') == string::npos && t.find('0') == string::npos) { ok = false; } if (t.find('@') == string::npos && t.find('$') == string::npos) { ok = false; } if (ok) { st.insert(t); } } cout << st.size() << endl; }