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