#include <bits/stdc++.h>
using namespace std;
using ll = long long;
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  ll n;
  cin >> n;
  ll mo = 1000, st = 0;
  vector<ll> a(n + 5, 0), pre(n + 5, 0);
  for (int i = 1; i <= n; ++i) cin >> a[i];
  for (int i = n; i >= 1; --i) {
    pre[i] = max(pre[i + 1], a[i]);
  }
  for (ll i = 1; i <= n; ++i) {
    if (pre[i] <= a[i]) {
      mo += st * a[i];
      st = 0;
      break;
    }
    if (a[i] < a[i + 1]) {
      st += mo / a[i];
      mo -= (mo / a[i]) * a[i];
    } else {
      mo += st * a[i];
      st = 0;
    }
  }
  cout << mo;
  return 0;
}
