#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pe = pair<int, int>;
int main(void) {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  int mon = 1000;
  int stock = 0;
  A.push_back(0);
  for (int i = 1; i < N + 1; i++) {
    if (A[i - 1] < A[i]) {
      stock += mon / A[i - 1];
      mon = mon % A[i - 1];
    } else if (A[i - 1] > A[i]) {
      mon += stock * A[i - 1];
      stock = 0;
    }
  }
  cout << mon << endl;
  return 0;
}
