#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
using ll = long long;
const vector<int> dx = {1, 0, -1, 0};
const vector<int> dy = {0, 1, 0, -1};
const double PI = 3.1415926535;
const ll inf = 1001001001;
const ll e9 = 1000000000;
const ll mod = 1000000007;
int main() {
  int n;
  cin >> n;
  vector<int> a(n), cntplus(n), cntminus(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  for (int i = 0; i < n - 1; ++i) {
    for (int j = i + 1; j < n; ++j) {
      if (a[i] > a[j])
        cntminus[i]++;
      else if (a[i] < a[j])
        cntplus[i]++;
    }
  }
  int start = 1000;
  int stock = 0;
  for (int i = 0; i < n; ++i) {
    if (i == 0) {
      if (cntplus[i] > 0) {
        stock = start / a[i];
        start %= a[i];
      }
    } else if (i == n - 1) {
      start += stock * a[i];
    } else {
      if (cntplus[i] > 0 && cntminus[i] > 0) {
        start += a[i] * stock;
        stock = 0;
      } else if (cntplus[i] > 0 && cntminus[i] == 0) {
        stock += start / a[i];
        start %= a[i];
      } else if (cntplus[i] == 0 && cntminus[i] > 0) {
        start += a[i] * stock;
        stock = 0;
      } else {
        start += a[i] * stock;
        stock = 0;
      }
    }
  }
  cout << start << endl;
}
