#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
template <typename T>
void read(T &x) {
  x = 0;
  int f = 1;
  char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -1;
  for (; isdigit(c); c = getchar()) x = (x << 1) + (x << 3) + c - '0';
  x *= f;
}
int n;
int a[N];
int ans;
int main() {
  read(n);
  for (int i = 1; i <= n; i++) read(a[i]);
  ans = 1000;
  for (int i = 2; i <= n; i++)
    if (a[i - 1] < a[i]) ans += (a[i] - a[i - 1]) * (ans / a[i - 1]);
  printf("%d\n", ans);
  return 0;
}
