#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
using ll = long long;
using pii = pair<int, int>;
const int MOD = 1e9 + 7;
const int INF = 1e9 + 1e2;
void stndrtn() {}
const bool flag = 0;
void ma1n() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int& first : a) {
    cin >> first;
  }
  vector<pii> v;
  int lst = 0;
  for (int i = 0; i < n; ++i) {
    if (a[i] > a[i + 1]) {
      if (lst != i) {
        v.push_back({lst, i});
      }
      lst = i + 1;
    }
  }
  int m = 1000;
  for (pii first : v) {
    if (m / a[first.first] * a[first.second] + m % a[first.first] > m) {
      m = m / a[first.first] * a[first.second] + m % a[first.first];
    }
  }
  cout << m;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(nullptr), stndrtn();
  int ts = 1;
  if (flag) {
    cin >> ts;
  }
  while (ts--) {
    ma1n();
  }
  return 0;
}
