#include <bits/stdc++.h>
using namespace std;
const int maxd = 85;
void solve(int n, const array<int, maxd>& a) {
  bool has = false;
  bool up = false;
  int curr_s = 0;
  int curr_p = 1000;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1] && !up) {
      has = 1;
      up = true;
      curr_s = floor(curr_p / a[i]);
      curr_p -= curr_s * a[i];
    }
    if (a[i] > a[i + 1] && up) {
      has = 0;
      up = false;
      curr_p += curr_s * a[i];
      curr_s = 0;
    }
  }
  if (curr_s > 0) {
    curr_p += curr_s * a[n - 1];
  }
  cout << curr_p << endl;
}
int main() {
  int n;
  array<int, maxd> a;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  solve(n, a);
  return 0;
}
