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