#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < (N); i++) cin >> A[i];
  int money = 1000;
  int kabu = 0;
  int m_max = 1000;
  for (int i = 0; i < N; i++) {
    if (A[i] < A[i + 1]) {
      kabu = money / A[i];
      money = money % A[i];
    }
    if (A[i] > A[i + 1]) {
      money += kabu * A[i];
      kabu = 0;
      m_max = max(m_max, money);
    }
  }
  cout << m_max << endl;
}
