#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  vector<int> buy;
  for (int i = 1; i < n; i++) {
    if (a[i] > a[i - 1]) {
      buy.push_back(i - 1);
    }
  }
  int ans = -1;
  int len = buy.size();
  for (int i = 0; i < (1 << len); i++) {
    int money = 1000;
    for (int j = 0; j < (buy.size()); ++j) {
      if (i & (1 << j)) {
        int stock = money / a[buy[j]];
        money += (a[buy[j] + 1] - a[buy[j]]) * stock;
      }
    }
    ans = max(ans, money);
  }
  cout << ans << endl;
  return 0;
}
