#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
const ll INF = 1LL << 60;
int main() {
  int n;
  cin >> n;
  vector<ll> a(n);
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  int money = 1000;
  int stock = 0;
  int temp = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] > a[temp]) {
      stock += money / a[temp];
      money -= stock * a[temp];
      money += stock * a[i];
      stock = 0;
    }
    if (a[temp] > a[i]) {
      temp = i;
    }
  }
  cout << money << endl;
}
