#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const int inf = (1 << 21);
const long long INF = 1LL << 60;
using ll = long long;
using ii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vb = vector<bool>;
using vl = vector<ll>;
using vs = vector<string>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<ll>>;
using vvb = vector<vector<bool>>;
using vii = vector<pair<int, int>>;
using vll = vector<pair<ll, ll>>;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
T GCD(T a, T b) {
  if (b == 0)
    return a;
  else
    return GCD(b, a % b);
}
template <class T>
T LCM(T a, T b) {
  return a / GCD(a, b) * b;
}
constexpr array<int, 9> dx = {0, 1, 0, -1, -1, 1, 1, -1, 0};
constexpr array<int, 9> dy = {1, 0, -1, 0, 1, 1, -1, -1, 0};
int main() {
  int n;
  cin >> n;
  vi a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  int m = 1000, k = 0;
  int low = 100, high = 100;
  bool flg = true;
  for (int i = 0; i < (n); i++) {
    if (flg && low > a[i]) {
      k = m / a[i];
      m %= a[i];
      high = a[i];
      flg = false;
    }
    if (flg && low >= a[i] && i == 0) {
      k = m / a[i];
      m %= a[i];
      high = a[i];
      flg = false;
    }
    if (!flg && high < a[i]) {
      m += a[i] * k;
      k = 0;
      low = a[i];
      flg = true;
    }
  }
  cout << m << endl;
}
