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