#include <bits/stdc++.h>
using namespace std;
using p = pair<int, int>;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); i++) {
    cin >> a[i];
  }
  int b = 1000;
  int c = 0;
  for (int i = 0; i <= n - 2; i++) {
    if (a[i] < a[i + 1]) {
      int k = b;
      b = b % a[i];
      c += k / a[i];
    } else if (a[i] > a[i + 1]) {
      int m = b;
      b = m + c * a[i];
      c = 0;
    }
  }
  if (a[n - 1] > a[n - 2]) {
    int d = b;
    b = d + c * a[n - 1];
  }
  cout << b << endl;
  return 0;
}
