#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  cin >> n;
  long long ans = 1000, idx = 0;
  vector<long long> a(n), mi(n, -1), ma(n, -1);
  for (int i = 0; i < (int)(n); ++i) {
    cin >> a.at(i);
    if (i == 0) {
      mi.at(0) = a.at(i);
      ma.at(0) = a.at(i);
    } else {
      if (ma.at(idx) < a.at(i)) {
        ma.at(idx) = a.at(i);
      } else if (ma.at(idx) > a.at(i)) {
        idx++;
        mi.at(idx) = a.at(i);
        ma.at(idx) = a.at(i);
      }
    }
  }
  for (int i = 0; i < (int)(idx + 1); ++i) {
    if (mi.at(i) == -1 || mi.at(i) == -1 || mi.at(i) == ma.at(i)) continue;
    int k = ans / mi.at(i);
    ans += k * (ma.at(i) - mi.at(i));
  }
  cout << ans << endl;
  return 0;
}
