#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  long long m = 1000;
  long long k = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<long long> s(n);
  s[0] = 0;
  for (int i = 0; i < n - 1; i++) {
    s[i + 1] = a[i + 1] - a[i];
  }
  vector<int> ss(n - 1, 0);
  for (int i = 0; i < n - 1; i++) {
    if (s[i] <= 0 && s[i + 1] > 0) {
      ss[i] = 1;
    }
    if (s[i] >= 0 && s[i + 1] < 0) {
      ss[i] = 2;
    }
  }
  for (int i = 0; i < n - 1; i++) {
    if (ss[i] == 1) {
      k += (m / a[i]);
      m -= k * a[i];
    }
    if (ss[i] == 2) {
      m += k * a[i];
      k = 0;
    }
  }
  cout << m + k * a[n - 1] << endl;
}
