#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long LINF = 1LL << 60;
const int INF = 1 << 30;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<long long> money(n + 1, 1000);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < i; j++) {
      money[i] = max(money[i], money[j] - ((money[j] / a[j]) * a[j]) +
                                   ((money[j] / a[j]) * a[i]));
    }
  }
  long long res = 1000;
  for (int i = 0; i < n; i++) {
    res = max(res, money[i]);
  }
  cout << res << endl;
  return 0;
}
