n=int(input())
a_list=list(map(int,input().split()))
current=1000
kabu=0
for i in range(n-1) print(current)
  if a_list[i]<a_list[i+1] :
    kabu+=current//a_list[i]
    current=current%a_list[i]
  else :
    current+=a_list[i]*kabu
    kabu=0
current+=a_list[-1]*kabu
print(current)