N = int(input())
A = list(map(int, input().strip().split()))
day=0
money=1000
stock=0
is_up=True
while day<N :
    if is_up :
        past_day=day
        while A[day]<=A[day+1]:
            day+=1
            if day==N-1:
                break
        stock=int(money/A[past_day])
        money+=stock*(A[day]-A[past_day])
        day+=1
        is_up=False
    else :
        while A[day]>=A[day+1] :
            day+=1
            if day==N-1:
                day+=1
                break
        is_up=True


print("{}".format(money))



