#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using Graph = vector<vector<int>>;
const double PI = 3.14159265358979323846;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
ll gcd(ll x, ll y) { return (x % y) ? gcd(y, x % y) : y; }
ll lcm(ll x, ll y) { return x / gcd(x, y) * y; }
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (ll i = 0; i < (ll)(n); i++) cin >> a[i];
  int m = 1000;
  int k = 0;
  for (ll i = 0; i < (ll)(n - 1); i++) {
    if (k == 0) {
      if (a[i] < a[i + 1]) {
        k = m / a[i];
        m = m - (k * a[i]);
      }
    }
    if (k > 0) {
      if (a[i] > a[i + 1]) {
        m = k * a[i];
        k = 0;
      }
    }
  }
  m += k * a[n - 1];
  cout << m << endl;
  return 0;
}
