#include <bits/stdc++.h>
using namespace std;
using P = pair<int, int>;
static const long long MOD = 1000000007;
static const long long LINF = (long long)(1e18 + 99);
static const int INF = 1e9 + 99;
int main(void) {
  int N;
  cin >> N;
  vector<int> A(N, 0), c(205, 0);
  for (int i = (0); i < (N); i++) cin >> A[i];
  int now = 1000, val = 0, stock = 0;
  for (int i = (0); i < (N); i++) {
    if (A[i] > val) {
      now += A[i] * stock;
      int c = now / A[i];
      stock = c;
      val = A[i];
      now -= c * A[i];
    } else if (A[i] < val) {
      now += val * stock;
      int c = now / A[i];
      stock = c;
      val = A[i];
      now -= c * A[i];
    }
  }
  int ans = now + stock * val;
  cout << ans << "\n";
  return 0;
}
