#include <bits/stdc++.h>
int main(void) {
  int n, min, nm;
  int a[80];
  min = 200;
  nm = 1000;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    if (min > a[i]) {
      min = a[i];
    }
    if (min < a[i]) {
      nm = (nm / min) * a[i] + nm % min;
      min = a[i];
    }
  }
  printf("%d", nm);
  return 0;
}
