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