#include <bits/stdc++.h>
#pragma GCC optimize(3, "Ofast", "inline")
using namespace std;
const double esp = 1e-6, pi = acos(-1);
const int N = 1e6 + 10, INF = 0x3f3f3f3f, mod = 1e9 + 7;
int a[N];
int work() {
  int ans = 1000;
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i < n; i++)
    if (a[i] < a[i + 1]) ans += (a[i + 1] - a[i]) * (ans / a[i]);
  cout << ans << endl;
  return 0;
}
int main() {
  work();
  return 0;
}
