#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
const int mxn = 85;
ll a[mxn];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  multiset<ll> slot;
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  ll money = 1000, stock = 0;
  for (int i = 1; i <= n; i++) {
    if (slot.empty() or *slot.begin() >= a[i]) {
      slot.insert(a[i]);
    } else if (*slot.begin() < a[i]) {
      ll ex = money / (*slot.begin());
      money -= ex * (*slot.begin());
      money += ex * a[i];
      slot.erase(slot.begin());
      slot.insert(a[i]);
    }
  }
  cout << money << '\n';
  return 0;
}
