S = input() N = 8 loas = {"l", "o", "a", "s"} ans = set() for bit in range(1 << N): T = list(S[:]) for i in range(N): if bit & (1 << i) and S[i] in loas: if S[i] == 'l': T[i] = '1' elif S[i] == 'o': T[i] = '0' elif S[i] == 'a': T[i] = '@' elif S[i] == 's': T[i] = '$' f, g, h = 0, 0, 0 for i in range(N): if ord('a') <= ord(T[i]) <= ord('z'): f = 1 elif ord('0') <= ord(T[i]) <= ord('9'): g = 1 elif T[i] == '@' or T[i] == '$': h = 1 if f and g and h: ans.add("".join(T)) print(len(ans))