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