#include <bits/stdc++.h>
using namespace std;
const int MM = 1000000000;
const int MOD = MM + 7;
const int MAX = 510000;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
const long long INF = 1LL << 60;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  int p = n - 1;
  for (long long i = 0; i < n - 1; i++) {
    if (a[n - i - 1] > a[n - i - 2]) break;
    p--;
  }
  int mon = 1000;
  int cap = 0;
  for (long long i = 0; i < n - 1; i++) {
    if (i == p) {
      cout << mon + cap * a[i] << endl;
      return 0;
    }
    if (a[i] == a[i + 1])
      continue;
    else if (a[i] < a[i + 1]) {
      cap += mon / a[i];
      mon %= a[i];
    } else {
      mon += cap * a[i];
      cap = 0;
    }
  }
  mon += cap * a[n - 1];
  cout << mon << endl;
}
