import sys input = lambda :sys.stdin.readline()[:-1] ni = lambda :int(input()) na = lambda :list(map(int,input().split())) yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES") no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO") ####################################################################### s = input() ans = set() n = len(s) for p in range(1<> i & 1 and s[i] == "l": t[i] = "1" if p >> i & 1 and s[i] == "o": t[i] = "0" if p >> i & 1 and s[i] == "a": t[i] = "@" if p >> i & 1 and s[i] == "s": t[i] = "$" a,b,c = 0, 0,0 for i in range(n): if t[i] in "1234567890": c += 1 if t[i] in "@$": a +=1 t = "".join(t) if 0 < c and 0 < a and a + c < n: ans.add(t) print(len(ans))