#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using mii = map<int, int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using vpii = vector<pii>;
using int64 = long long;
const int inf = 2e9 + 7;
const char nwl = '\n';
const int mxx = 1e6 + 3;
int64 sumV(vi &v) {
  int64 s = 0;
  for (int x : v) {
    s += (int64)x;
  }
  return s;
}
int gcd(int a, int b) {
  if (!b) return a;
  return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int64 n;
  cin >> n;
  vector<int64> v(n);
  for (auto &x : v) cin >> x;
  int64 x = 1000, t = 0, d = 0;
  int64 i = 0;
  while (i < n) {
    if (i == n) {
      x += d * v[i];
      d = 0;
    } else if (v[i + 1] < v[i]) {
      x += d * v[i];
      d = 0;
    } else {
      d += x / v[i];
      x -= (x / v[i]) * v[i];
    }
    i++;
  }
  cout << x;
  return 0;
}
