#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = 1LL << 60;
long long mod_pow(long long, long long, long long);
long long mod_fact(long long, long long);
long long mod_inv(long long, long long);
long long gcd(long long, long long);
long long lcm(long long, long long);
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n + 1);
  for (int i = 0; i < n; i++) cin >> a[i];
  long long total = 1000, cap = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] > a[i + 1]) {
      total += cap * a[i];
      cap = 0;
    }
    if (a[i] < a[i + 1]) {
      cap = total / a[i];
      total %= a[i];
    }
  }
  cout << total;
}
