#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() {
  int index, kabu;
  long long result{1000};
  long long n;
  cin >> n;
  vector<int> a(n + 5, -1);
  for (long long i = 0; i < long long(n); i++) {
    cin >> a[i];
  }
  for (long long i = 0; i <= long long(n - 2); i++) {
    kabu = 0;
    if (a[i] < a[i + 1]) kabu = result / a[i];
    result += (a[i + 1] - a[i]) * kabu;
  }
  cout << result << endl;
  return 0;
}
