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