#include <bits/stdc++.h>
int main(void) {
  int n;
  int *a;
  int money = 1000;
  int kabu = 0;
  int i;
  scanf("%d", &n);
  a = (int *)malloc(sizeof(int) * n);
  for (i = 0; i < n; i++) {
    scanf("%d", a + i);
  }
  for (i = 0; i < n; i++) {
    if (i < n - 1) {
      if (a[i] < a[i + 1]) {
        int number = money / a[i];
        money -= a[i] * number;
        kabu += number;
      } else if (a[i] > a[i + 1]) {
        money += a[i] * kabu;
        kabu = 0;
      }
    } else {
      money += a[i] * kabu;
      kabu = 0;
    }
  }
  printf("%d\n", money);
  free(a);
  return 0;
}
