#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll GetDigit(ll num) { return log10(num) + 1; }
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  int ma = a[0];
  ll ans = 1000;
  for (int i = 0; i < (int)(n); i++) {
    ma = max(a[i], ma);
  }
  if (ma == a[0]) {
    cout << ans << endl;
    return 0;
  }
  int mi = a[0];
  int k = 0;
  for (int i = 0; i < (int)(n - 1); i++) {
    if (a[i + 1] > mi) {
      k = ans / mi;
      ans -= k * mi;
      ans += a[i + 1] * k;
      mi = a[i + 1];
    } else {
      mi = min(a[i + 1], mi);
    }
  }
  cout << ans << endl;
  return 0;
}
