#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (size_t i = 0; i < (N); ++i) cin >> A[i];
  vector<vector<int>> u(N, vector<int>()), d(N, vector<int>()),
      e(N, vector<int>());
  for (int i = 0; i < N - 1; ++i) {
    for (int j = i + 1; j < N; ++j) {
      if (A[i] < A[j])
        u[i].push_back(j);
      else if (A[i] > A[j])
        d[i].push_back(j);
      else
        e[i].push_back(j);
    }
  }
  int cur = 1000;
  int s = 0;
  vector<int> buyflags(N, 0);
  for (int i = 0; i < N; ++i) {
    if (buyflags[i] == 1) {
      cur += s * A[i];
      s = 0;
      continue;
    }
    if (u[i].size() == 0 && d[i].size() != 0) {
      if (s == 0) break;
      cur += s * A[i];
      s = 0;
      continue;
    } else if (d[i].size() == 0 && u[i].size() != 0) {
      s += cur / A[i];
      cur = cur - cur / A[i] * A[i];
      buyflags[u[i][0]] = 1;
      continue;
    } else if (d[i].size() == 0 && u[i].size() == 0) {
      if (s > 0) cur += s * A[i];
      break;
    }
    int idxp = u[i][0];
    int idxm = d[i][0];
    if (idxp < idxm) {
      s += cur / A[i];
      cur = cur - cur / A[i] * A[i];
      buyflags[idxp] = 1;
    }
  }
  cout << cur << endl;
  return 0;
}
