#include <bits/stdc++.h>
int compare_int(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int main() {
  int n, a[100];
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  int f = 0, motone = 0, okane = 1000, kazu = 0;
  if (a[0] > a[1])
    f = -1;
  else {
    kazu = okane / a[0];
    okane -= kazu * a[0];
    f = 1;
  }
  for (int i = 1; i < n - 1; i++) {
    if ((f > 0) && (a[i] > a[i + 1])) {
      okane += kazu * a[i];
      kazu = 0;
      f = -1;
    } else if ((f < 0) && (a[i] < a[i + 1])) {
      kazu = okane / a[i];
      okane -= kazu * a[i];
      f = 1;
    }
  }
  if (kazu != 0) {
    okane += kazu * a[n - 1];
    kazu = 0;
  }
  printf("%d\n", okane);
  return 0;
}
