#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  vector<int> A(N);
  for (size_t i = 0; i < N; i++) {
    cin >> A.at(i);
  }
  int kabu = 0;
  int money = 1000;
  for (size_t i = 0; i < N - 1; i++) {
    if (A.at(i) < A.at(i + 1)) {
      kabu = money / A.at(i);
      money -= kabu * A.at(i);
      money += kabu * A.at(i + 1);
    }
  }
  cout << money;
  return 0;
}
