#include <bits/stdc++.h>
int N;
int a[80];
int find_locallow(int idx) {
  for (int i = idx; i < N - 1; i++) {
    if (a[i] < a[i + 1]) return i;
  }
  return -1;
}
int find_localhigh(int idx) {
  int i;
  for (i = idx; i < N - 1; i++) {
    if (a[i] > a[i + 1]) break;
  }
  return i;
}
int main(void) {
  int money = 1000;
  int kabu = 0;
  std::cin >> N;
  for (int i = 0; i < N; i++) {
    std::cin >> a[i];
  }
  for (int i = 0; i < N; i++) {
    int buy = find_locallow(i);
    if (buy == -1) break;
    {
      kabu += money / a[buy];
      money -= (money / a[buy]) * a[buy];
      i = buy;
    }
    int sell = find_localhigh(i);
    {
      money += a[sell] * kabu;
      kabu = 0;
      i = sell;
    }
  }
  std::cout << money << std::endl;
  return 0;
}
