#include <bits/stdc++.h>
using namespace std;
long long int inf = (1e18 + 2);
int main() {
  long long int n;
  cin >> n;
  long long int a[n + 1];
  long long int val = 1000;
  long long int div;
  long long int stocks = 0;
  for (long long int i = 0; i < n; i++) cin >> a[i];
  for (long long int i = 0; i < n - 1; i++) {
    if (a[i] == a[i + 1]) {
      continue;
    }
    if (a[i] < a[i + 1]) {
      div = (val / a[i]);
      stocks += div;
      val -= (div * a[i]);
      val += (div * a[i + 1]);
      stocks -= div;
      i++;
      continue;
    }
  }
  if (stocks > 0) val += (stocks * a[n - 1]);
  cout << val << endl;
  return 0;
}
