#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long kane = 1000;
  long long kabu = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1]) {
      kabu += kane / a[i];
      kane -= kabu * a[i];
    } else if (a[i] > a[i + 1]) {
      kane += kabu * a[i];
      kabu = 0;
    }
  }
  kane += kabu * a[n - 1];
  cout << kane << endl;
  return 0;
}
