#include <bits/stdc++.h>
using namespace std;
using int64 = long long;
constexpr int DEBUG = 0;
template <class T>
inline bool UpdateMin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool UpdateMax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int64> xs(n);
  for (int i = 0; i < n; i++) {
    cin >> xs[i];
  }
  vector<int64> dp(n);
  dp[0] = 1000;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      if (xs[i] < xs[j]) {
        int64 u = dp[i] / xs[i];
        int64 r = dp[i] % xs[i];
        int64 v = u * xs[j] + r;
        UpdateMax(dp[j], v);
      }
    }
  }
  int64 ans = 0;
  for (int i = 0; i < n; i++) {
    UpdateMax(ans, dp[i]);
  }
  cout << ans << endl;
}
