#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vec = vector<ll>;
using vec2 = vector<vector<ll>>;
ll inf = pow(2, 62);
int main() {
  int n;
  cin >> n;
  vec A(n);
  for (int i = 0; i < (int)(n); i++) {
    cin >> A[i];
  }
  int mon = 1000;
  for (int i = 0; i < n - 1; i++) {
    if (A[i] < A[i + 1]) {
      int e = mon / A[i];
      mon = mon - e * A[i] + e * A[i + 1];
    }
  }
  cout << mon << endl;
}
