#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n + 1];
  int m = 1000, s = 0, p = -1;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i + 1 <= n; i++) {
    if (a[i + 1] > a[i]) {
      s = m / a[i];
      m -= s * a[i];
      p = a[i];
    } else if (a[i] > p && p != -1) {
      m += s * a[i];
      s = 0;
    }
  }
  if (s > 0) m = m + s * a[n];
  cout << m << "\n";
  return 0;
}
