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