#include <bits/stdc++.h>
using namespace std;
template <typename TYPE>
void print_vec(const vector<TYPE>& v) {
  for (int i = 0; i < v.size(); i++) {
    cout << v[i] << " ";
  }
  cout << endl;
}
template <typename TYPE>
void print_vec2(const vector<vector<TYPE>>& v) {
  cout << endl;
  cout << "       ";
  for (int i = 0; i < v[0].size(); i++) cout << i << "   ";
  cout << endl;
  for (int i = 0; i < v.size(); i++) {
    cout << "i=" << i << ":   ";
    for (int j = 0; j < v[i].size(); j++) {
      if (v[i][j] == 0)
        cout << "\x1B[0m" << v[i][j] << "   ";
      else
        cout << "\x1B[31m" << v[i][j] << "   ";
    }
    cout << "\x1B[0m" << endl;
  }
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  int num = 0;
  long long yen = 1000;
  if (A[0] <= A[1]) {
    num = yen / A[0];
    yen -= yen / A[0] * A[0];
  }
  for (int i = 1; i < N - 1; i++) {
    if (A[i] >= A[i - 1]) {
      yen += num * A[i];
      num = 0;
    }
    if (A[i] < A[i - 1]) {
      num += yen / A[i];
      yen -= yen / A[i] * A[i];
    }
    if (A[i] >= A[i + 1]) {
      yen += num * A[i];
      num = 0;
    }
    if (A[i] < A[i + 1]) {
      num += yen / A[i];
      yen -= yen / A[i] * A[i];
    }
  }
  yen += num * A.back();
  cout << yen << endl;
  return 0;
}
