n = int(input())
a = list(map(int,input().split()))
genkin = 1000
kabu = 0

for i in range(n-1):
    # すべて現金
    genkin_tmp = genkin + a[i] * kabu

    # すべて株
    kazu = genkin//a[i]
    kabu_tmp = genkin - kazu * a[i] + kazu * a[i+1]

    if genkin_tmp > kabu_tmp:
        genkin = genkin + kabu * a[i]
        kabu = 0
    elif genkin_tmp < kabu_tmp:
        genkin = genkin - kazu * a[i]
        kabu = kabu + kazu

print(genkin + kabu * a[-1])