#include <bits/stdc++.h>
const int INF = 2147483647;
const long long int MOD = 1000000007;
using namespace std;
using ll = long long;
using P = pair<int, int>;
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;
}
int main() {
  int n;
  cin >> n;
  vector<ll> a(n, 0);
  bool b = false;
  for (long long i = 0; i < (n); ++i) {
    cin >> a[i];
  }
  ll res = 1000;
  for (long long i = 0; i < (n); ++i) {
    ll have = 1000;
    ll kabu = 0;
    ll before = a.front();
    for (long long i = 0; i < (n); ++i) {
      if (i == 0) {
        kabu += (have / a[i]);
        have -= a[i] * kabu;
      } else {
        if (a[i] == before) continue;
        if (a[i] > before) {
          have += kabu * a[i];
          kabu = 0;
          before = a[i];
        } else {
          have += kabu * a[i];
          kabu = 0;
          kabu += (have / a[i]);
          have -= a[i] * (have / a[i]);
        }
      }
    }
    res = max(res, have);
  }
  cout << res << endl;
  return 0;
}
