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