#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
void out(T a) {
  cout << a << endl;
}
int dx[] = {0, 0, -1, 1};
int dy[] = {1, -1, 0, 0};
long long inv[200005], fac[200005], finv[200005];
void make() {
  fac[0] = fac[1] = 1;
  finv[0] = finv[1] = 1;
  inv[1] = 1;
  for (int i = 2; i < 200005; i++) {
    inv[i] = 1000000007 - inv[1000000007 % i] * (1000000007 / i) % 1000000007;
    fac[i] = fac[i - 1] * (long long)i % 1000000007;
    finv[i] = finv[i - 1] * inv[i] % 1000000007;
  }
  return;
}
long long comb(int a, int b) {
  if (a < b) return 0;
  return fac[a] * (finv[b] * finv[a - b] % 1000000007) % 1000000007;
}
long long beki(int a, int n) {
  if (n == 0) return 1;
  long long ans = beki(a, n / 2);
  ans = ans * ans;
  if (n % 2 == 1) ans = ans * a;
  return ans;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  vector<int> A(N);
  for (long long i = 0; i < A.size(); ++i) cin >> A[i];
  ;
  bool in = false, de = false;
  int ma = A[0], mi = A[0];
  int money = 1000;
  bool have = false;
  for (int i = 1; i < (int)(N); i++) {
    if (A[i - 1] < A[i]) {
      money += money / A[i - 1] * (A[i] - A[i - 1]);
    }
  }
  cout << money << endl;
}
