#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  vector<int> prices(n);
  for (int i = 0; i < n; i++) {
    cin >> prices[i];
  }
  int ans = 1000;
  for (int i = 1; i < n; i++) {
    if (ans < prices[i]) continue;
    if (prices[i] > prices[i - 1]) {
      int f = ans / prices[i - 1];
      int beli = f * prices[i - 1];
      ans += (f * prices[i]) - beli;
    }
  }
  cout << ans;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  solve();
  return 0;
}
