#include <bits/stdc++.h>
using namespace std;
int a[80 + 2];
int main() {
  int n, k;
  long long ans = 1000, cnt = 0;
  scanf("%d", &n);
  for (int i = 0; ++i <= n; scanf("%d", a + i))
    ;
  for (int i = 0, cnt1; ++i < n;) {
    if (a[i] > a[i + 1]) {
      ans += cnt * a[i];
      cnt = 0;
      continue;
    }
    if (a[i] < a[i + 1]) {
      cnt1 = ans / a[i];
      ans -= cnt1 * a[i], cnt += cnt1;
      continue;
    }
  }
  ans += cnt * a[n];
  printf("%lld\n", ans);
  return 0;
}
