#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
const long long l_INF = 1010101010101010;
const int INF = 1010101010;
const int dx[4] = {-1, 0, 1, 0};
const int dy[4] = {0, -1, 0, 1};
using vi = vector<int>;
using vll = vector<long long>;
using vvi = vector<vi>;
using vvll = vector<vll>;
using pii = pair<int, int>;
using pll = pair<long long, long long>;
int main() {
  int n;
  cin >> n;
  vi a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  long long mon = 1000;
  int l_a = 0, l_k = 0;
  for (int i = 0; i < n; i++) {
    if (i < n - 1 && a[i] < a[i + 1]) {
      l_k = mon / a[i];
      mon += l_k * (a[i + 1] - a[i]);
      l_a = i;
      i++;
    }
  }
  if (l_a + 2 <= n && a[l_a + 1] < a[l_a + 2])
    mon += l_k * (a[l_a + 2] - a[l_a + 1]);
  cout << mon << endl;
}
