#include <bits/stdc++.h>
using namespace std;
int main(void) {
  long long n;
  cin >> n;
  vector<long long> a(n + 1);
  for (int i = 0; i < (int)(n); i++) {
    cin >> a[i];
  }
  long long t = 1000;
  long long m = t;
  long long k = 0;
  for (int i = 0; i < n; i++) {
    long long j = i + 1;
    while (1) {
      if (a[i] > a[j]) {
        break;
      } else if (a[i] < a[j]) {
        int q = t / a[i];
        t -= q * a[i];
        k = q;
        t += a[j] * k;
        break;
      }
      j++;
    }
    i = j;
    m = max(t, m);
  }
  cout << m << endl;
}
