#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  vector<int> A(N + 1);
  for (int i = 0; i < N; ++i) {
    cin >> A[i];
  }
  int m = 1000, k = 0;
  for (int i = 0; i < N; ++i) {
    if (A[i] < A[i + 1]) {
      k += m / A[i];
      m -= m / A[i] * A[i];
    } else {
      m += A[i] * k;
      k = 0;
    }
  }
  cout << m << endl;
  return 0;
}
