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