#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;
}
template <typename V, typename T>
bool find_num(V v, T num) {
  if (find((v).begin(), (v).end(), num) == v.end()) {
    return false;
  }
  return true;
}
int main() {
  int64_t n;
  cin >> n;
  std::vector<int64_t> a(n);
  for (int64_t i = 0; i < n; ++i) {
    cin >> a[i];
  }
  int64_t ans = 1000;
  if (a[0] != *max_element((a).begin(), (a).end())) {
    int64_t have = 0;
    for (int64_t i = 0; i < n - 1; ++i) {
      if (a[i] < a[i + 1]) {
        have = ans / a[i];
        ans += (a[i + 1] - a[i]) * have;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
