#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using Pt = pair<int, int>;
int main() {
  int N;
  cin >> N;
  vi A(N);
  for (auto& x : A) cin >> x;
  int x = 1000;
  int y = 0;
  for (int i = 0; i < N - 1; ++i) {
    if (A[i] < A[i + 1]) {
      int z = x / A[i];
      x -= z * A[i];
      y += z;
    } else {
      x += y * A[i];
      y = 0;
    }
  }
  x += y * A[N - 1];
  cout << x << endl;
  return 0;
}
