#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using vi = vector<int>;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int& e : a) cin >> e;
  ll funds = 1000, stocks = 0;
  for (int i = 0; i < n - 1; i++) {
    stocks = a[i] / funds;
    funds += max(a[i + 1] - a[i], 0) * stocks;
  }
  cout << funds << endl;
}
