#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  int money = 1000;
  int stock = 0;
  for (int i = 0; i < N; i++) cin >> A[i];
  int state = 0;
  if (A[0] < A[1]) {
    stock = money / A[0];
    money %= A[0];
    state = 1;
  }
  for (int i = 1; i < N - 1; i++) {
    if (A[i] == A[i + 1])
      continue;
    else if (A[i] > A[i + 1]) {
      if (state == 1 || state == 0) {
        money = stock * A[i];
        stock = 0;
      }
      state = -1;
    } else {
      if (state == -1 || state == 0) {
        stock = money / A[i];
        money %= A[i];
      }
      state = 1;
    }
  }
  money += stock * A[N - 1];
  cout << money << endl;
  return 0;
}
