#include <bits/stdc++.h>
using namespace std;
const int N = 500001;
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long int lcm(long long int a, long long int b) {
  return a * b / gcd(a, b);
}
using namespace std;
long long int max(long long int a, long long int b) {
  if (a > b) return a;
  return b;
}
long long int min(long long int a, long long int b) {
  if (a < b) return a;
  return b;
}
long long int inf = 100000000000000000;
vector<pair<int, int> > adj[N];
void solve() {
  int n;
  cin >> n;
  long long int mon = 1000;
  vector<int> a(n + 2);
  a[0] = INT_MAX;
  a[n + 1] = INT_MIN;
  for (long long int i = 0; i < n; i++) cin >> a[i + 1];
  long long int mx = -1;
  int s = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i] < a[i - 1] && a[i] <= a[i + 1]) {
      s += mon / a[i];
      mon -= (mon / a[i]) * a[i];
    } else if (a[i] > a[i + 1] && a[i] >= a[i - 1]) {
      mon += s * a[i];
      s = 0;
    }
  }
  mon += s * a[n];
  cout << mon << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int T = 1;
  int t = 0;
  while (t++ < T) {
    solve();
  }
  cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC
       << "ms\n";
}
