#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<long long int> arr(N);
  for (int i = 0; i < N; i++) cin >> arr[i];
  long long int capital = 1000, x = 0, pre = 0;
  for (int i = 0; i < N; i++) {
    if (i < N - 1 && arr[i] < arr[i + 1]) {
      x = (capital / arr[i]);
      capital = capital % arr[i];
      pre = arr[i];
    } else if (arr[i] > pre && (i == N - 1 || (arr[i] > arr[i + 1]))) {
      capital += (x * arr[i]);
      pre = 0;
      x = 0;
    }
  }
  if (pre != 0) capital += (x * pre);
  cout << capital;
  return 0;
}
