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