#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int N;
  cin >> N;
  vector<long long> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  long long sum = 1000;
  long long stock = 0;
  int now = 0;
  while (now != N - 1) {
    if (A[now] < A[now + 1]) {
      stock += sum / A[now];
      sum = sum - A[now] * stock;
      now++;
    } else if (A[now] == A[now + 1]) {
      now++;
    } else {
      sum += A[now] * stock;
      stock = stock - sum / A[now];
      now++;
    }
  }
  if (stock > 0) sum += A[N - 1] * stock;
  cout << max(sum, (long long)1000) << endl;
  return 0;
}
