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