#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const double pi = acos(-1);
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch > '9' || ch < '0') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int n, k;
int a[200005];
int main() {
  int i, j;
  n = read();
  for (i = 1; i <= n; i++) a[i] = read();
  int now = 1000;
  for (i = 2; i <= n; i++) {
    if (a[i] > a[i - 1]) {
      int x = now / a[i - 1];
      now -= x * a[i - 1];
      now += x * a[i];
    }
  }
  cout << now;
  return 0;
}
