#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
long long gcd(long long A, long long B) {
  if (B == 0) return A;
  return gcd(B, A % B);
}
long long lcm(long long A, long long B) { return A * B / gcd(A, B); }
using Graph = vector<vector<int>>;
Graph G;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long int i = 0; i < n; i++) cin >> a[i];
  vector<long long> b;
  b.push_back(a[0]);
  bool flag = false;
  long long i = 0;
  while (i < n - 1) {
    long long MAX = 0, MIN = 201;
    if (!flag and a[i] <= a[i + 1]) {
      while (i < n - 1 and a[i] <= a[i + 1]) {
        i++;
        MAX = a[i];
      }
    } else if (flag and a[i] >= a[i + 1]) {
      while (i < n - 1 and a[i] >= a[i + 1]) {
        i++;
        MIN = a[i];
      }
    }
    if (!flag and MAX != 0) {
      b.push_back(MAX);
      flag = true;
    } else if (flag and MIN != 210) {
      b.push_back(MIN);
      flag = false;
    } else {
      i++;
    }
  }
  if (b.size() == 1) {
    cout << 1000 << endl;
    return 0;
  }
  long long ans = 1000;
  long long kabu = 0;
  for (long long int i = 0; i < b.size(); i++) {
    if (i == b.size() - 1 and b.size() % 2 != 0) break;
    if (i % 2 == 0) {
      kabu = ans / b[i];
      ans -= b[i] * kabu;
    } else {
      ans += b[i] * kabu;
      kabu = 0;
    }
  }
  cout << ans << endl;
  return 0;
}
