N = int(input())
A = [int(_) for _ in input().split()]

dp = [1000]
K = [0]
C = [0]

for i in range(N):
    k, c = divmod(dp[-1], A[i])
    v = max(dp[-1], K[-1] * A[i] + C[-1])

    K.append(k)
    C.append(c)
    dp.append(v)

print(dp[-1])
