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