#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int inP = 1000;
  int stocks = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] > a[i + 1]) {
      inP += (stocks * a[i]);
      stocks = 0;
    } else if (a[i] < a[i + 1]) {
      int buy = inP / a[i];
      stocks += buy;
      inP -= (buy * a[i]);
    }
  }
  inP += (stocks * a[n - 1]);
  cout << inP << "\n";
  return 0;
}
