#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 (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
const long long dx[4] = {1, 0, -1, 0};
const long long dy[4] = {0, 1, 0, -1};
const long long dx2[8] = {0, 1, 0, -1, 1, 1, -1, -1};
const long long dy2[8] = {1, 0, -1, 0, 1, -1, 1, -1};
const long double pi = acos(-1.0);
const long long MAX = 1000010;
const long long INF = 1LL << 60;
const long long MOD = 1000000007;
signed main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < (long long)(n); i++) cin >> a[i];
  long long now = 1000;
  long long cnt = 0;
  for (long long i = 0; i < (long long)(n); i++) {
    if (i == 0) {
      if (a[1] > a[0]) {
        cnt += now / a[0];
        now -= cnt * a[0];
      }
    } else if (i == n - 1) {
      now += cnt * a[i];
    } else {
      if (a[i + 1] > a[i] && a[i] <= a[i - 1]) {
        cnt += now / a[i];
        now -= cnt * a[i];
      } else if (a[i + 1] < a[i] && a[i] >= a[i - 1]) {
        now += cnt * a[i];
        cnt = 0;
      }
    }
  }
  cout << now << endl;
  return 0;
}
