#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  int M = 1000;
  int S = 0;
  for (int i = 0; i < N; i++) {
    int minA = min_element(A.begin(), A.end()) - A.begin();
    if (i == minA) {
      int count = M / A[i];
      M -= A[i] * count;
      S += count;
    } else {
      M += A[i] * S;
      S = 0;
    }
    A.erase(A.begin());
  }
  cout << M << endl;
  return 0;
}
