a = list(map(int, input().split())) cnt=0 for i in range(len(a)): s="" if int(a[i])%3==0: s+="Fizz" if int(a[i])%5==0: s+="Buzz" if s=="": s+=str(a[i]) cnt+=len(s) print(cnt)