#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int& it : a) cin >> it;
  int j = 0, cash = 1000;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] > a[i + 1]) {
      cash += (a[i] - a[j]) * (cash / a[j]);
      j = i + 1;
    }
  }
  cash += (a[n - 1] - a[j]) * (cash / a[j]);
  cout << cash << '\n';
  return 0;
}
