S=input() now=[""] for s in S: next=[] if s=="l": for t in now: next.append(t+"l") next.append(t+"1") elif s=="o": for t in now: next.append(t+"o") next.append(t+"0") elif s=="a": for t in now: next.append(t+"a") next.append(t+"@") elif s=="s": for t in now: next.append(t+"s") next.append(t+"$") else: for t in now: next.append(t+s) now=next chr_set=set(chr(i+97) for i in range(26)) numb_set=set(str(i) for i in range(10)) ans=0 for X in now: flag=[0,0,0] for t in X: if t in chr_set: flag[0]=1 elif t in numb_set: flag[1]=1 else: flag[2]=1 if flag==[1,1,1]: ans+=1 print(ans)