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

if max(arr)==arr[0]:
    print(1000)
else:
    amari = 1000
    can_buy = int((amari-amari%arr[0])/arr[0])
    poss = can_buy
    amari -= can_buy*arr[0]

    for i in range(1,n-1):
        if arr[i+1] == arr[i]:
            continue
        elif arr[i+1] > arr[i]:
            can_buy = int((amari-amari%arr[i])/arr[i])
            poss+=can_buy
            amari -= can_buy*arr[i]
        else:
            amari += poss*arr[i]
            poss=0
    print(amari+poss*arr[n-1])
