#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  int possess = 0;
  int money = 1000;
  for (int i = 0; i < N - 1; i++) {
    if (possess && A[i] > A[i + 1]) {
      money += possess * A[i];
      possess = 0;
    } else if (possess && A[i] < A[i + 1]) {
      continue;
    } else if (!possess && A[i] > A[i + 1]) {
      continue;
    } else if (!possess && A[i] < A[i + 1]) {
      possess = money / A[i];
      money -= possess * A[i];
    }
  }
  money += possess * A[N - 1];
  cout << money << "\n";
}
