#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int m = 1000;
  int s = 0;
  int a[n + 1];
  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 += s * a[i];
      s = 0;
    }
    if (a[i] < a[i + 1]) {
      s += m / a[i];
      m = m % a[i];
    }
  }
  m += s * a[n - 1];
  cout << m << '\n';
}
