#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
const double PI = acos(-1);
const ll MOD = 1000000007;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  vector<int> B(N - 1);
  for (int i = 0; i < (N); i++) {
    cin >> A[i];
    if (i > 0) {
      if (A[i - 1] < A[i])
        B[i - 1] = 1;
      else if (A[i - 1] == A[i])
        B[i - 1] = 0;
      else
        B[i - 1] = -1;
    }
  }
  int money = 1000;
  int kabu = 0;
  int ans = 0;
  for (int i = 0; i < (N - 1); i++) {
    if (B[i] == 1) {
      kabu = money / A[i];
      money -= kabu * A[i];
    }
    if (B[i] == -1) {
      money += kabu * A[i];
      kabu = 0;
    }
    ans = max(ans, money);
  }
  money += kabu * A[N - 1];
  ans = max(ans, money);
  cout << ans << endl;
}
