#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
signed main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  int money = 1000;
  for (int i = 0; i < A.size() - 1; i++) {
    if (A[i + 1] > A[i]) {
      int stocks = money / A[i];
      money += (A[i + 1] - A[i]) * stocks;
    }
  }
  cout << money << endl;
  return 0;
}
