#include <bits/stdc++.h>
int main(void) {
  int N;
  scanf("%d", &N);
  int *A, *B;
  A = (int *)malloc(sizeof(int) * N);
  B = (int *)malloc(sizeof(int) * N);
  for (int i = 0; i < N; i++) scanf("%d", &A[i]);
  for (int i = 0; i < N; i++) {
    int count = 0;
    for (int j = 0; j < N; j++) {
      if (A[i] > A[j]) count++;
    }
    B[i] = count;
  }
  int money = 1000;
  int tmp;
  int stock = 0;
  for (int i = 0; i < N - 1; i++) {
    if (B[i] < B[i + 1]) {
      stock += money / A[i];
      money %= A[i];
    }
    if (B[i] >= B[i + 1]) {
      money += stock * A[i];
      stock = 0;
    }
  }
  money += stock * A[N - 1];
  printf("%d\n", money);
  return 0;
}
