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