#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N;
  cin >> N;
  long long A[N];
  for (long long i = 0; i < long long(N); i++) cin >> A[i];
  long long backet = 1000, have = 0;
  for (long long i = 0; i < long long(N); i++) {
    if (i == N - 1) {
      backet += have * A[i];
    } else {
      if (A[i] < A[i + 1]) {
        have = backet / A[i];
        backet -= have * A[i];
      } else {
        backet += have * A[i];
        have = 0;
      }
    }
  }
  cout << backet << endl;
}
