#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (long long i = (0); i < (n); i++) {
    cin >> a[i];
  }
  int money = 1000;
  int kabu = 0;
  for (long long i = (0); i < (a.size()); i++) {
    if (i == a.size() - 1) {
      cout << (money + kabu * a[i]) << endl;
      return 0;
    }
    if (kabu == 0) {
      if (a[i] < a[i + 1]) {
        kabu += money / a[i];
        money -= kabu * a[i];
      }
    } else {
      if (a[i] > a[i + 1]) {
        money += kabu * a[i];
        kabu = 0;
      }
    }
  }
}
