n = int(input()) a = list(map(int, input().split())) count = 0 for num in a: if (num & (num - 1)) != 0: count += 1 print(count)