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