#include <bits/stdc++.h>
using namespace std;
using ll = unsigned long long int;
int main() {
  int n, k = 0;
  cin >> n;
  int A[n];
  for (int i = 0; i < n; i++) {
    cin >> A[i];
  }
  int p = 1000;
  for (int i = 0; i < n - 1; i++) {
    if (A[i] < A[i + 1]) {
      k = p % A[i];
      p = p / A[i];
      p = p * A[i + 1] + k;
    }
  }
  cout << p;
  return 0;
}
