use proconio::{fastout, input};
use std::*;

#[fastout]
fn main() {
    input! {
        n: usize,
        a: [i32; n],
    }
    let mut l = 0usize;
    let mut r = 0usize;
    let mut res = 1000;
    while r < n && l < n {
        if a[r] == a[l] {
            r += 1;
        } else if a[r] > a[l] {
            res += (res / a[l]) * (a[r] - a[l]);
            l = r + 1;
            r += 1;
        } else {
            l = r;
        }
    }
    println!("{}", res);
}
