#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int n;
  cin >> n;
  vector<ll> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  ll ans = 1000;
  for (int i = 0; i < n - 1; i++) {
    int kabu = 0;
    if (a[i] < a[i + 1]) {
      kabu = ans / a[i];
    }
    ans -= kabu * a[i];
    ans += kabu * a[i + 1];
  }
  cout << ans << endl;
}
