def judge_pass(s: str): i = 0 j = 0 k = 0 for l in range(len(s)): if s[l].isdecimal(): i += 1 elif s[l].isalpha(): j += 1 else: k += 1 if i > 0 and j > 0 and k > 0: return 1 else: return -1 def replacement(chara): if chara == "l": return "1" elif chara == "o": return "0" elif chara == "a": return "@" elif chara == "s": return "$" else: return chara chara_l = ["l", "o", "a", "s"] s = input() pass_num = 0 pass_l = [s] y= 0 for i in range(len(s)): if s[i] in chara_l: for j in range(len(pass_l)): temp_password = pass_l[j] temp_password = temp_password[0:i] + replacement(temp_password[i]) + temp_password[i+1:len(s)] pass_l.append(temp_password) for i in range(len(pass_l)): if judge_pass(pass_l[i]) == 1: y += 1 print(y)