#include <bits/stdc++.h>
const int factor_N = 1e7 + 5;
const int tree_arr_N = 1e6 + 5;
using namespace std;
int read() {
  char c = getchar();
  int x = 0, f = 1;
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -1;
  for (; isdigit(c); c = getchar()) x = x * 10 + c - 48;
  return x * f;
}
int n, p1, p2;
int main() {
  n = read();
  int m = 1000, cnt = 0;
  vector<int> a(n + 2, 0);
  bool flag = false;
  for (int i = (1); i <= (n); ++i) {
    a[i] = read();
    if (i != 1 && a[i] > a[i - 1]) flag = true;
  }
  if (!flag) {
    cout << 1000 << endl;
    return 0;
  }
  for (int i = (1); i <= (n); ++i) {
    p1 = i;
    while (i <= n && a[i] < a[i + 1]) ++i;
    p2 = i;
    if (p1 != p2) {
      cnt = m / a[p1];
      m += cnt * (a[p2] - a[p1]);
    }
  }
  cout << m << endl;
  return 0;
}
