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