def main():

    N = int(eval(input()))

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



    money = 1000



    low = A[0]

    high = -1

    for x in A:

        if high < x:

            high = x

            continue



        if high > x:

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

            low = high = x



    money += max(0, high - low) * (money // low)



    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 += max(0, p - low) * (money // low)



    print(money)





if __name__ == '__main__':

    main()

def main():
    N = int(eval(input()))
    (*A,) = list(map(int, input().split()))
    money = 1000
    low = A[0]
    high = -1
    for x in A:
        if high < x:
            high = x
            continue
        if high > x:
            money += (high - low) * (money // low)
            low = high = x
    money += max(0, high - low) * (money // low)
    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 += max(0, p - low) * (money // low)
    print(money)


if __name__ == "__main__":
    main()

-    high = -1 +    p = A[0] -        if high < x: -            high = x -            continue -        if high > x: -            money += (high - low) * (money // low) -            low = high = x -    money += max(0, high - low) * (money // low) +        if p > x: +            money += (p - low) * (money // low) +            low = x +        p = x +    money += max(0, p - low) * (money // low)