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