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