days = int(input())
yen = 1000
prices = list(map(int, input().split()))
stocks = 0

for i in range(0, days-1):
  if prices[i] < prices[i+1]:
    yen %= prices[i]
    stocks = yen // prices[i]
  elif prices[i] > prices[i+1]:
    yen += stocks*prices[i]
    stocks = 0
  print(yen)

yen += stocks*prices[days-1]

print(yen)