#include <bits/stdc++.h>
using namespace std;
unordered_map<long, long> mp;
unordered_map<long, long> mp2;
int main() {
  int N;
  int A[100];
  int B[100];
  int kane = 1000;
  int kabu = 0;
  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  B[0] = 0;
  for (int i = 1; i < N; i++) {
    if (A[i] - A[i - 1] > 0) {
      B[i] = 1;
    } else if (A[i] - A[i - 1] < 0) {
      B[i] = -1;
    } else {
      B[i] = 0;
    }
  }
  for (int i = 0; i < N - 1; i++) {
    if (B[i + 1] == 1 && (B[i] == 0 || B[i] == -1)) {
      kabu = kane / A[i];
      kane = kane - A[i] * kabu;
    } else if (B[i + 1] == -1 && (B[i] == 0 || B[i] == 1)) {
      kane += kabu * A[i];
      kabu = 0;
    }
  }
  if (kabu != 0) {
    kane += kabu * A[N - 1];
    kabu = 0;
  }
  cout << kane << "\n";
  return 0;
}
