#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  int a[n];
  for (long long i = 0; i < (long long)(n); i++) cin >> a[i];
  vector<int> v;
  int tmp, idx = 0;
  bool buy = true;
  tmp = a[0];
  v.emplace_back(0);
  for (long long i = 1; i <= (long long)(n - 1); i++) {
    if (buy) {
      if (tmp < a[i]) {
        v.emplace_back(i);
        tmp = a[i];
        idx++;
        buy = false;
      } else if (tmp > a[i])
        v[idx] = i;
    } else {
      if (tmp > a[i]) {
        v.emplace_back(i);
        tmp = a[i];
        idx++;
        buy = true;
      } else if (tmp < a[i])
        v[idx] = i;
    }
  }
  if (long long(v.size()) == 1) {
    cout << 1000 << endl;
    return 0;
  }
  int sum = 1000;
  int kaisu = long long(v.size());
  if (kaisu % 2 == 1) kaisu--;
  for (int i = 0; i < kaisu; i += 2) {
    int buy = sum / a[v[i]];
    sum = sum % a[v[i]] + buy * a[v[i + 1]];
  }
  cout << sum << endl;
  return 0;
}
