#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll gcd(ll a, ll b) {
  if (a % b == 0)
    return (b);
  else
    return (gcd(b, a % b));
}
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
int main() {
  ll n;
  cin >> n;
  vector<ll> a(n);
  for (ll i = (1); i < (n + 1); i++) {
    cin >> a[i];
  }
  vector<ll> dp(n + 1);
  dp[1] = 1000;
  for (ll i = (2); i < (n + 1); i++) {
    dp[i] = dp[i - 1];
    for (ll j = (1); j < (i); j++) {
      ll c = dp[j] / a[j];
      ll m = dp[j] + (a[i] - a[j]) * c;
      dp[i] = max(dp[i], m);
    }
  }
  cout << dp[n] << endl;
  ;
  return 0;
}
