#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 < N; ++i) cin >> A[i];
  int money = 1000;
  int stock = 0;
  int i = 0;
  while (i < N - 1) {
    if (A[i] == A[i + 1]) {
      while (i + 1 < N && A[i] == A[i + 1]) i += 1;
    } else if (A[i] < A[i + 1]) {
      stock = money / A[i];
      money = money % A[i];
      while (i + 1 < N && A[i] < A[i + 1]) {
        i += 1;
      }
    } else {
      money += stock * A[i];
      stock = 0;
      while (i + 1 < N && A[i] > A[i + 1]) {
        i += 1;
      }
    }
  }
  money += A[N - 1] * stock;
  cout << money << endl;
  return 0;
}
