#include <bits/stdc++.h>
int main(void) {
  long long int price[81], N, i, stock, money, max;
  scanf("%lld", &N);
  for (i = 0; i < N; i++) {
    scanf("%lld", &price[i]);
  }
  money = 1000;
  max = 1000;
  stock = 0;
  for (i = 0; i < N - 1; i++) {
    if (price[i] < price[i + 1]) {
      stock = money / price[i];
      money = money - price[i] * stock;
    } else if (price[i] > price[i + 1]) {
      money = money + price[i] * stock;
      stock = 0;
    }
    if (money > max) {
      max = money;
    }
  }
  if (stock != 0) {
    money = money + price[N - 1] * stock;
    if (max < money) {
      max = money;
    }
  }
  printf("%lld", max);
  return 0;
}
