#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[100];
  int N;
  int p;
  int kabu;
  int q;
  cin >> N;
  p = 1000;
  kabu = 0;
  for (int i = 0; i < N; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < N - 1; i++) {
    if (a[i] < a[i + 1]) {
      q = p / a[i];
      kabu += q;
      p -= q * a[i];
    } else {
      q = p / a[i];
      p += kabu * a[i];
      kabu = 0;
    }
  }
  p += kabu * a[N - 1];
  cout << p << endl;
  return 0;
}
