n = int(input())
a=list(map(int,input().split()))

kane=1000
kabu =0
sa=[a[i+1]-a[i] for i in range(n-1)]

for i in range(n-1):
    if sa[i]>0:
        kabu,kane=divmod(kane,a[i])
    elif sa[i]==0:
        continue
    else:
        kane+=kabu*a[i]

print(kane+kabu*a[n-1])