#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int N, Ans = 1000, K = 0;
  cin >> N;
  bool C = 0;
  vector<long long int> V(N);
  for (long long int i = 0; i < N; i++) cin >> V[i];
  for (long long int i = 1; i < N; i++) {
    if (V[i] == V[i - 1]) continue;
    if (V[i] > V[i - 1] && !C) {
      C = 1;
      K += floorl(Ans / V[i - 1]);
      Ans -= V[i - 1] * floorl(Ans / V[i - 1]);
      continue;
    }
    if (V[i] < V[i - 1] && C) {
      Ans += V[i - 1] * K;
      K = 0;
      C = 0;
      continue;
    }
  }
  if (C && V[N - 1] > V[N - 2]) Ans += V[N - 1] * K;
  cout << Ans;
}
