#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int main() {
  long long n;
  cin >> n;
  vector<long long> v(n);
  cin >> v.at(0);
  for (long long i = 1; i < n; i++) {
    cin >> v.at(i);
  }
  long long kabu = 0;
  long long yen = 1000;
  for (long long i = 0; i < n - 1; i++) {
    long long tmp = v.at(i);
    long long ne = v.at(i + 1);
    if (tmp < ne) {
      kabu = max(kabu, yen / tmp);
      yen -= tmp * kabu;
    } else if (tmp > ne) {
      yen += tmp * kabu;
      kabu = 0;
    }
  }
  yen += v.at(n - 1) * kabu;
  cout << yen << endl;
}
