#include <bits/stdc++.h>
int compare_int(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int compare_int2(const void *a, const void *b) { return *(int *)b - *(int *)a; }
int main(void) {
  int n;
  int A[100] = {0};
  int bs[100] = {0};
  int money = 1000;
  int kabu;
  int i;
  int max;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &A[i]);
  }
  max = A[0];
  for (i = 0; i < n; i++) {
    if (max < A[i]) {
      max = A[i];
    }
  }
  if (max == A[0]) {
    printf("1000");
    return 0;
  }
  for (i = 0; i < n; i++) {
    if (A[i] < A[i + 1]) {
      bs[i] = 1;
    }
  }
  for (i = 0; i < n; i++) {
    if (bs[i] == 1) {
      kabu = money / A[i];
      money -= A[i] * kabu;
    } else {
      money += A[i] * kabu;
      kabu = 0;
    }
  }
  printf("%d", money);
  return 0;
}
