#include <bits/stdc++.h>
using namespace std;
int main(void) {
  long long N;
  cin >> N;
  vector<long long> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  long long money = 1000, stock = 0;
  for (int i = 0; i < N - 1; i++) {
    if (A[i] <= A[i + 1] && money > 0) {
      stock += money / A[i];
      money = money % A[i];
    } else {
      money += stock * A[i];
      stock = 0;
    }
  }
  money += stock * A[N - 1];
  printf("%lld\n", money);
  return 0;
}
