#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
template <class T>
bool ch1000000(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
const int MAX = 42;
int main() {
  int N;
  cin >> N;
  vector<int> A(N), sell(N, 0), buy(N, 0);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  int d = 0;
  if (A[0] < A[1]) {
    d = 1;
    buy[0] = 1;
  } else if (A[0] > A[1]) {
    d = -1;
  }
  if (A[N - 1] > A[N - 2]) {
    sell[N - 1] = 1;
  }
  int day = 1;
  while (day < N - 1) {
    if (d == 1) {
      if (A[day] > A[day + 1]) {
        sell[day] = 1;
        d = -1;
      }
    } else if (d == -1) {
      if (A[day] < A[day + 1]) {
        buy[day] = 1;
        d = 1;
      }
    }
    day++;
  }
  int stock = 0, money = 1000;
  for (int i = 0; i < N; i++) {
    if (buy[i] == 1) {
      int stock_buy = money / A[i];
      money -= A[i] * stock_buy;
      stock += stock_buy;
    }
    if (sell[i] == 1) {
      money += A[i] * stock;
      stock = 0;
    }
  }
  cout << money << endl;
}
