#include <bits/stdc++.h>
using namespace std;
int q, n;
long long int ans, sum;
long long int gcd(long long int a, long long int b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
long long int powe(long long int a, long long int b) {
  long long int res = 1;
  while (b > 0) {
    if (b % 2 == 1) {
      res = (res * a);
    }
    a = (a * a);
    b /= 2;
  }
  return res;
}
const int N = 200005;
long long int a[N], b[N], dp[N], dp1[N];
void solve() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  a[0] = LLONG_MAX;
  vector<long long int> v;
  a[n + 1] = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i] > a[i - 1] && a[i] >= a[i + 1]) v.push_back(a[i]);
    if (a[i] < a[i - 1] && a[i] <= a[i + 1]) v.push_back(a[i]);
  }
  sum = 1000;
  int cnt = 0;
  for (int i = 0; i < v.size(); i++) {
    if (i % 2 == 0) {
      int n1 = sum / v[i];
      sum -= (n1 * v[i]);
      cnt = n1;
    } else {
      sum += cnt * v[i];
    }
  }
  cout << sum << "\n";
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  q = 1;
  int tt = 1;
  while (q--) {
    solve();
  }
  cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC
       << "ms\n";
  return 0;
}
