#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  ll m = 1000;
  int kb = 0;
  int c = 0;
  for (int i = 0; i < (n); ++i) {
    if (kb > 0 && c <= a[i]) {
      m += kb * a[i];
      kb = 0;
    }
    bool buy = false;
    for (int j = i + 1; j < n; j++) {
      if (a[i] < a[j]) {
        buy = true;
        break;
      } else if (a[i] > a[j]) {
        break;
      } else if (a[i] == a[j]) {
        continue;
      }
    }
    if (buy) {
      kb = m / a[i];
      m -= kb * a[i];
      c = a[i];
    }
  }
  cout << m << endl;
  return 0;
}
