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

#[fastout]
fn main() {
    input! {
        n: usize,
        a: [i32; n],
    }
    let mut res = 1000;
    for i in 0..n - 1 {
        if a[i] < a[i + 1] {
            res += (res / a[i]) * (a[i + 1] - a[i]);
        }
    }
    println!("{}", res);
}
