n=int(input()) a=list(map(int,input().split())) z=0 for i in range(n) : if a[i] == 0 : z+=1 else: a=[aj%a[i] for aj in a] print(n-z)