#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N;
  int money = 1000;
  int result;
  long long k = 0;
  cin >> N;
  vector<long long> vec(N);
  for (long long i = 0; i < N; i++) {
    cin >> vec.at(i);
  }
  for (long long i = 0; i < N - 1; i++) {
    if (vec.at(i) < vec.at(1 + i)) {
      k += money / vec.at(i);
      money -= k * vec.at(i);
    }
    if (vec.at(i) > vec.at(1 + i)) {
      money = money + k * vec.at(i + 1);
      result = money;
    }
  }
  money += vec.at(N - 1) * k;
  if (money < result) {
    cout << result << endl;
  } else {
    cout << money;
  }
}
