#include <bits/stdc++.h>
using ll = long long;
using ull = unsigned long long;
using namespace std;
constexpr int inf = 1 << 30;
constexpr int mo = 1e9 + 7;
constexpr ll infl = 1ll << 60;
int main() {
  cin.tie(nullptr);
  std::ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> a(n);
  for (auto& b : a) cin >> b;
  vector<ll> dp(n + 1);
  dp[0] = 1000;
  for (int i = 1; i <= n; ++i) {
    dp[i] = dp[i - 1];
    for (int j = 0; j < i; ++j) {
      ll num = dp[j] / a[j];
      ll w = dp[j] + (a[i] - a[j]) * num;
      dp[i] = max(dp[i], w);
    }
  }
  cout << dp[n] << endl;
  return 0;
}
