#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 ans = 1000;
  vector<int> a(n + 2, 0);
  for (int i = (1); i <= (n); ++i) a[i] = read();
  for (int i = (2); i <= (n); ++i)
    if (a[i] > a[i - 1]) {
      int cnt = floor(ans * 1.0 / a[i - 1]);
      ans += cnt * (a[i] - a[i - 1]);
    }
  cout << ans << endl;
  return 0;
}
