import re def check(l): s="".join(l) c=0 for e in [r"[a-z]",r"[0-9]",r"[\@\$]"]: if re.search(e,s):c+=1 return c==3 def f(s,i): res=0 if i==8: if check(s): return 1 else: return 0 else: for e in [['l',"1"],['o',"0"],['a',"@"],['s',"$"]]: if s[i]==e[0]: s[i]=e[1] res+=f(s,i+1) s[i]=e[0] res+=f(s,i+1) return res print(f(list(input()),0))