#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Pii = pair<int, int>;
using Pll = pair<ll, ll>;
using VI = vector<int>;
using VL = vector<ll>;
using VVI = vector<vector<int> >;
using VVL = vector<vector<ll> >;
void Main() {
  int n;
  ll ans = 1000, st = 0;
  cin >> n;
  VL a(n);
  for (ll i = 0; i < (n); ++i) cin >> a[i];
  for (ll i = (0); i <= (n - 1); ++i) {
    if (a[i] < a[i + 1]) {
      st += ans / a[i];
      ans -= st * a[i];
    } else if (a[i] > a[i + 1]) {
      ans += st * a[i];
      st = 0;
    }
  }
  ans += st * a[n - 1];
  st = 0;
  cout << ans << endl;
}
int main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(15);
  Main();
  return 0;
}
