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