#include <bits/stdc++.h>
static const long long MOD_NUM = 1000000007;
template <class _T>
static void get(_T& a) {
  std::cin >> a;
}
template <class _T>
static void get(_T& a, _T& b) {
  std::cin >> a >> b;
}
template <class _T>
static void get(_T& a, _T& b, _T& c) {
  std::cin >> a >> b >> c;
}
static void D();
int main() {
  D();
  fflush(stdout);
  return 0;
}
static void D() {
  int N;
  get(N);
  std::vector<int> ai(N);
  for (int i = 0; i < N; i++) {
    get(ai[i]);
  }
  std::vector<int> mov(N, 0);
  int buyIdx = 0, sellIdx = 0;
  int price = ai[0];
  for (int i = 1; i < N; i++) {
    if (ai[i] < ai[i - 1]) {
      if (sellIdx) {
        mov[sellIdx] = 2;
        mov[buyIdx] = 1;
        price = ai[i];
        buyIdx = i;
        sellIdx = 0;
      } else if (ai[i] < price) {
        buyIdx = i;
        price = ai[i];
      }
    } else if (ai[i] > ai[i - 1]) {
      sellIdx = i;
    }
  }
  if (sellIdx) {
    mov[sellIdx] = 2;
    mov[buyIdx] = 1;
  }
  int money = 1000;
  int stock = 0;
  for (int i = 0; i < N; i++) {
    if (mov[i] == 1) {
      stock = money / ai[i];
      money = money % ai[i];
    } else if (mov[i] == 2) {
      money += ai[i] * stock;
      stock = 0;
    }
  }
  printf("%d\n", money);
}
