import sys
from collections import deque
input = sys.stdin.readline


def readstr():
    return input().strip()


def readint():
    return int(input())


def readnums():
    return map(int, input().split())


def readstrs():
    return input().split()


def main():
    N = readint()
    A = list(readnums())
    b = 1000
    s = 0
    for i in range(N - 1):
        if A[i] < A[i + 1]:
            s += b // A[i]
            b %= A[i]
        elif A[i] > A[i + 1]:
            b += A[i] * s
            s = 0

    if A[-1] > A[-2]:
        b += A[-1] * s
        s = 0

    print(b)
    # d = deque(A)
    # d.appendleft(201)
    # d.append(0)
    # # ans = 1000 + (max(A) - min(A)) * (1000 // min(A))
    # il = []
    # for i in range(N):
    #     if d[i] <= d[i + 1] and d[i + 1] > d[i + 2]:
    #         il.append(i)
    #     elif d[i] >= d[i + 1] and d[i + 1] < d[i + 2]:
    #         il.append(i)

    # # print(il)
    # if len(il) <= 1:
    #     print(1000)
    # else:
    #     b = 1000
    #     s = 0
    #     if A[il[0]] < A[il[1]]:
    #         for i, v in enumerate(il):
    #             if not i % 2:
    #                 s += b // A[v]
    #                 b -= s * A[v]
    #             else:
    #                 b += s * A[v]
    #                 s = 0
    #             # print(b, s)
    #     else:
    #         for i, v in enumerate(il):
    #             if i % 2:
    #                 s += b // A[v]
    #                 b -= s * A[v]
    #             else:
    #                 b += s * A[v]
    #                 s = 0
    #             # print(b, s)
    #     if s:
    #         b = A[il[-1]] * s

    #     print(max(b, 1000))


if __name__ == "__main__":
    main()
