s=input() if 'l' not in s and 'o' not in s: print(0) exit() x=s.count('l')+s.count('o') y=s.count('a')+s.count('s') res=(2**x-1)*(2**y-1) if x+y==8: res-=1 print(max(0,res))