#include <bits/stdc++.h>
using namespace std;
const int Maxn = 2100000;
const int inf = 0x3f3f3f3f;
int n, a[Maxn];
signed main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  int ans = 1000;
  for (int i = 2; i <= n; i++)
    if (a[i] > a[i - 1]) ans += (a[i] - a[i - 1]) * (ans / a[i - 1]);
  printf("%d\n", ans);
  return 0;
}
