#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long INF = 1e18;
const double pi = acos(-1.0);
int main(void) {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < (n); ++i) cin >> a[i];
  long long ans = 1000, tmp = 0;
  for (int i = 1; i < n; i++) {
    if (a[i - 1] < a[i]) {
      tmp += ans / a[i - 1];
      ans += tmp * (a[i] - a[i - 1]);
    } else
      tmp = 0;
  }
  cout << ans << endl;
  return 0;
}
