import sys
input = sys.stdin.readline
def main():
    N = int(input())
    A = list(map(int, input().split()))
    yd = A[0]
    B = 0
    tmp = 1000
    for i in range(1,N):
        if yd < A[i]:
            B = tmp//yd
            tmp = tmp - yd * B
        if yd > A[i]:
            if B > 0:
                tmp += yd * B
        yd = A[i]
    if B > 0:
        tmp += yd*B
    print(tmp)    

if __name__ == '__main__':
    main()