n=int(input())
a=[int(x) for x in input().rstrip().split()]
now=1000
cnt=0
flag=0

for i in range(n-1):
    if flag==1:
        now+=cnt*a[i]
        cnt=0
        flag=0
        continue

    if a[i]<a[i+1]:
        cnt=now//a[i]
        now=now-cnt*a[i]
        flag=1

if flag==1:
    now+=cnt*a[n-1]
print(now)