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