#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, a0, a1, m = 1000;
  cin >> N;
  cin >> a0;
  for (int i = 1; i < N; i++) {
    cin >> a1;
    if (a0 < a1) {
      m = (m / a0) * a1 + m % a0;
    }
    a0 = a1;
  }
  cout << m << endl;
  return 0;
}
