#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 cur = 1000;
  int stock = 0;
  for (int i = 0; i < N; i++) {
    cur += stock * A[i];
    stock = 0;
    if (i < N - 1 && (A[i] < A[i + 1])) {
      int x = cur / A[i];
      stock = x;
      cur -= x * A[i];
    }
  }
  cout << cur << '\n';
  return 0;
}
