#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  int highest;
  int now = 1000;
  for (int i = 0; i < (int)(N); i++) {
    cin >> A[i];
    if (i > 0) highest = max(A[i], A[i - 1]);
  }
  if (highest == A[0]) {
    cout << now << '\n';
    return 0;
  }
  for (int i = 0; i < (int)(N); i++) {
    if (i > 0 && A[i] > A[i - 1]) {
      now = A[i] * (now / A[i - 1]) + now % A[i - 1];
    }
  }
  cout << now << '\n';
  return 0;
}
