#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;
}
using ll = long long;
using pi = pair<int, int>;
using vi = vector<int>;
using vii = vector<vi>;
int main() {
  int n;
  cin >> n;
  vi a(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  vii dp1(n + 1, vi(200, 0));
  vi dp2(n + 1, 0);
  dp2[0] = 1000;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < 200; ++j) {
      chmax(dp1[i + 1][j], dp1[i][j]);
      chmax(dp2[i + 1], j + dp1[i][j] * a[i]);
    }
    chmax(dp1[i + 1][dp2[i] % a[i]], dp2[i] / a[i]);
    chmax(dp2[i + 1], dp2[i]);
  }
  cout << dp2[n] << "\n";
  return 0;
}
