#include <bits/stdc++.h>
int main() {
  int n, a[80 + 1] = {0}, comp[79 + 1] = {0}, money = 1000, stock = 0;
  int min = 201, mini, last = 0;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    if (a[i] < min) {
      min = a[i];
      mini = i;
    }
    if (i != 0) {
      if (a[i] < a[i - 1]) {
        comp[i] = -1;
      } else if (a[i] > a[i - 1]) {
        comp[i] = 1;
        last = i;
      } else {
        comp[i] = 0;
      }
    }
  }
  if (mini != (n - 1)) {
    stock = 1000 / min;
    money = 1000 % min;
    for (int i = mini + 1; i < n; i++) {
      if (i == last) {
        money = money + stock * a[i];
      } else if (money >= a[i] && comp[i] == -1) {
        stock = money / a[i];
        money = money % a[i];
      } else if (stock > 0 && comp[i] == 1) {
        money = money + stock * a[i];
      }
    }
  }
  printf("%d\n", money);
  return 0;
}
