#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A.at(i);
  }
  long long Money = 1000;
  long long Stock = 0;
  if (A.at(1) > A.at(0)) {
    Stock += Money / A.at(0);
    Money -= Stock * A.at(0);
  }
  for (int i = 1; i < N - 1; i++) {
    if (A.at(i + 1) >= A.at(i) && A.at(i) < A.at(i - 1)) {
      if (Money >= A.at(i)) {
        Stock += Money / A.at(i);
        Money -= Stock * A.at(i);
      } else
        continue;
    } else if (A.at(i + 1) <= A.at(i) && A.at(i) > A.at(i - 1)) {
      Money += Stock * A.at(i);
      Stock = 0;
    } else
      continue;
  }
  Money += Stock * A.at(N - 1);
  cout << Money << endl;
}
