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