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