#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
int knigtx8[] = {2, 2, -2, -2, 1, 1, -1, -1};
int knigty8[] = {1, -1, 1, -1, 2, -2, 2, -2};
int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dy8[] = {1, -1, 1, -1, 0, 0, -1, 1};
int dx4[] = {0, 0, 1, -1};
int dy4[] = {1, -1, 0, 0};
const int maxx = 100005;
bool sortinrev(const pair<int, int> &a, const pair<int, int> &b) {
  return a.first > b.first;
}
long long pw(long long a, long long b) {
  long long ans = 1;
  for (long long i = 1; i <= b; ++i) ans = (ans * a);
  return ans;
}
template <typename T>
inline T Bigmod(T base, T power, T MOD) {
  T ret = 1;
  while (power) {
    if (power & 1) ret = (ret * base) % MOD;
    base = (base * base) % MOD;
    power >>= 1;
  }
  return ret;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ;
  int n;
  cin >> n;
  int a[n], cnt[201];
  vector<int> v;
  vector<pair<int, int>> vp;
  memset(cnt, 0, sizeof(cnt));
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    cnt[a[i]] = 1;
  }
  vp.push_back({a[n - 1], 0});
  int c = 0;
  for (int i = n - 2; i >= 0; i--) {
    if (a[i] < a[i + 1]) {
      c++;
      vp.push_back({a[i], c});
    } else {
      c = 0;
      vp.push_back({a[i], c});
    }
  }
  reverse(vp.begin(), vp.end());
  int have = 1000, stock = 0;
  for (int i = 0; i < vp.size();) {
    if (vp[i].second > 0) {
      stock = have / vp[i].first;
      have = have % vp[i].first;
      i += vp[i].second;
      have += stock * vp[i].first;
    } else {
      i++;
      continue;
    }
  }
  cout << have << endl;
  return 0;
}
