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