#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = (0); i < (n); i++) {
    cin >> a[i];
  }
  long long m = 0;
  long long p = 1000;
  bool up = false;
  bool eq = true;
  for (long long i = (0); i < (n - 1); i++) {
    up = false;
    eq = true;
    for (long long j = i + 1; j < n; j++) {
      if (eq && a[j] != a[j - 1]) {
        eq = false;
        if (a[j] > a[j - 1]) {
          up = true;
        } else {
          up = false;
        }
      }
      if (eq) {
        break;
      }
      if (up) {
        if (a[j] >= a[j - 1] && j < n - 1) {
          continue;
        }
        if (j == n - 1) {
          m += p / a[i];
          p -= m * a[i];
          p += a[j] * m;
          m = 0;
        } else {
          m += p / a[i];
          p -= m * a[i];
          p += a[j - 1] * m;
          m = 0;
        }
        break;
      }
    }
  }
  cout << p << endl;
  return 0;
}
