#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  int money = 1000;
  int stocks = 0;
  int array[100] = {0};
  int lastSell = 0;
  int lastBuy = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", &array[i]);
  }
  if (array[0] <= array[1]) {
    lastBuy = array[0];
    stocks = money / array[0];
    money = money % array[0];
  }
  for (int i = 1; i < n - 1; i++) {
    if (array[i] <= array[i - 1] && array[i] <= array[i + 1] &&
        array[i] != lastBuy && array[i] != lastSell) {
      lastBuy = array[i];
      stocks = money / array[i];
      money = money % array[i];
    }
    if (array[i] >= array[i - 1] && array[i] >= array[i + 1] &&
        array[i] != lastSell && array[i] != lastBuy) {
      lastSell = array[i];
      money += stocks * array[i];
      stocks = 0;
    }
  }
  if (array[n - 1] >= array[n - 2]) {
    money += stocks * array[n - 1];
    stocks = 0;
  }
  printf("%d\n", money);
  return 0;
}
