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