#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> A(n);
  for (auto& a : A) cin >> a;
  ll mon = 1000;
  ll kabu = 0;
  bool cup = false;
  for (int i = 0; i < n; i++) {
    bool up = A[i] < A[i + 1];
    if (i < n - 1 and A[i] != A[i + 1]) {
      if (i == 0 or cup != up) {
        if (up) {
          int addk = mon / A[i];
          kabu += addk;
          mon -= addk * A[i];
        } else {
          int addm = kabu * A[i];
          mon += addm;
          kabu = 0;
        }
        cup = up;
      }
    }
    if (i == n - 1) {
      int addm = kabu * A[i];
      mon += addm;
      kabu = 0;
    }
  }
  cout << mon << endl;
  return 0;
}
