#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using p = pair<ll, ll>;
using graph = vector<vector<ll>>;
const long long inf = 2147483647;
const ll INF = 9223372036854775807;
signed main() {
  long long n;
  cin >> n;
  vector<long long> a;
  for (ll i = 0; i < n; i++) {
    long long t;
    cin >> t;
    if (!a.empty())
      if (t == a[a.size() - 1]) continue;
    a.push_back(t);
  }
  n = a.size();
  long long m = 1000, k = 0;
  for (ll i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1]) {
      k = m / a[i];
      m = m % a[i];
    } else {
      m += k * a[i];
      k = 0;
    }
  }
  m += k * a[a.size() - 1];
  cout << m << "\n";
  return 0;
}
