#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
int n, m, t, s;
int main() {
  cin >> n;
  t = 1000;
  s = 0;
  vector<int> vec(n, 0);
  for (int i = 0; i < n; ++i) cin >> vec[i];
  for (int i = 0; i < n; ++i) {
    if (i == n - 1) {
      t += vec[i] * s;
      continue;
    }
    if (i == 0 && vec[i + 1] > vec[i]) {
      s = t / vec[i];
      t %= vec[i];
      continue;
    }
    if (vec[i + 1] > vec[i]) {
      s += t / vec[i];
      t %= vec[i];
    } else if (vec[i] > vec[i - 1]) {
      t += vec[i] * s;
      s = 0;
    }
  }
  cout << t << endl;
  return 0;
}
