def main():

    N = int(eval(input()))

    *A, = list(map(int, input().split()))



    money = 1000



    low = A[0]

    p = A[0]

    for x in A:

        if p > x:

            money += (p - low) * (money // low)

            low = x

        p = x



    money += (p - low) * (money // low)



    print(money)





if __name__ == '__main__':

    main()

def main():

    _ = int(eval(input()))

    *A, = list(map(int, input().split()))

    A += [0]



    money = 1000

    stock = 0

    for a, b in zip(A, A[1:]):

        money += stock * a

        stock = 0

        if a < b:

            buy, rest = divmod(money, a)

            stock = buy

            money = rest

    print(money)





if __name__ == '__main__':

    main()

def main():
    N = int(eval(input()))
    (*A,) = list(map(int, input().split()))
    money = 1000
    low = A[0]
    p = A[0]
    for x in A:
        if p > x:
            money += (p - low) * (money // low)
            low = x
        p = x
    money += (p - low) * (money // low)
    print(money)


if __name__ == "__main__":
    main()

def main():
    _ = int(eval(input()))
    (*A,) = list(map(int, input().split()))
    A += [0]
    money = 1000
    stock = 0
    for a, b in zip(A, A[1:]):
        money += stock * a
        stock = 0
        if a < b:
            buy, rest = divmod(money, a)
            stock = buy
            money = rest
    print(money)


if __name__ == "__main__":
    main()

-    N = int(eval(input())) +    _ = int(eval(input())) +    A += [0] -    low = A[0] -    p = A[0] -    for x in A: -        if p > x: -            money += (p - low) * (money // low) -            low = x -        p = x -    money += (p - low) * (money // low) +    stock = 0 +    for a, b in zip(A, A[1:]): +        money += stock * a +        stock = 0 +        if a < b: +            buy, rest = divmod(money, a) +            stock = buy +            money = rest