#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main(void) {
  int N;
  cin >> N;
  vector<int> vec(N);
  for (int i = 0; i < N; i++) cin >> vec.at(i);
  ll ans = 1000;
  int kabu = 0;
  for (int i = 0; i < N - 1; i++) {
    ans += kabu * vec.at(i);
    kabu = 0;
    if (vec.at(i) < vec.at(i + 1)) {
      kabu = ans / vec.at(i);
      ans = ans % vec.at(i);
    }
  }
  ans += kabu * vec.at(N - 1);
  cout << ans << endl;
  return 0;
}
