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