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