#include <bits/stdc++.h>
using namespace std;
const long long INF = 1LL << 60;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < (int)(N); i++) cin >> A.at(i);
  int64_t M = 1000, S = 0;
  for (int i = 0; i < N - 1; i++) {
    if (A.at(i) <= A.at(i + 1)) {
      M -= (M / A.at(i)) * A.at(i);
      S = M / A.at(i);
      M += S * A.at(i + 1);
    }
  }
  cout << M;
}
