#include using namespace std; void fast_io() { ios_base::sync_with_stdio(false); cin.tie(nullptr); } bool is_ok(string &s) { bool ok_char = false, ok_dig = false, ok_sym = false; for (char c : s) { if (c >= 'a' && c <= 'z') { ok_char = true; } else if (c >= '0' && c <= '9') { ok_dig = true; } else { ok_sym = true; } } return ok_char && ok_dig && ok_sym; } int main() { fast_io(); string s; cin >> s; set ans; for (int st = 0; st < (1 << 8); st++) { string t = s; for (int i = 0; i < 8; i++) { if ((st & (1 << i)) == 0) { continue; } if (t[i] == 'a') { t[i] = '@'; } if (t[i] == 's') { t[i] = '$'; } if (t[i] == 'o') { t[i] = '0'; } if (t[i] == 'l') { t[i] = '1'; } } if (is_ok(t)) { ans.insert(t); } } cout << ans.size() << endl; }