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