#include <bits/stdc++.h>
int main() {
  int n;
  int array[80];
  int stock_num = 0;
  long long int total = 1000;
  int current_desition = 0;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &array[i]);
  }
  if (array[0] < array[1]) {
    current_desition = 1;
    stock_num = total / array[0];
    total = total % array[0];
  } else {
    current_desition = -1;
  }
  for (int i = 1; i < (n - 1); i++) {
    if ((array[i] < array[i + 1]) && (current_desition == -1)) {
      current_desition = 1;
      stock_num = total / array[i];
      total = total % array[i];
    } else if ((array[i] > array[i + 1]) && (current_desition == 1)) {
      current_desition = -1;
      total += stock_num * array[i];
      stock_num = 0;
    }
  }
  if (stock_num != 0) {
    total += stock_num * array[n - 1];
  }
  printf("%lld", total);
  return 0;
}
