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