#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using P = pair<int, int>;
int main() {
  ll n;
  cin >> n;
  vector<ll> v(n);
  for (ll i = 0; i < (ll)n; i++) cin >> v[i];
  vector<ll> dp(n + 1, 0);
  dp[0] = 1000;
  for (int i = 1; i <= n; i++) {
    dp[i] = dp[i - 1];
    for (ll j = 0; j < (ll)i; j++) {
      dp[i] = max(dp[i], dp[j] + (v[i] - v[j]) * (dp[j] / v[j]));
    }
  }
  cout << dp[n] << endl;
  return 0;
}
