#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
const ll INF = 1e18;
const int Inf = 1e9;
const double EPS = 1e-9;
const ll MOD = 1e9 + 7;
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(0);
  int n;
  cin >> n;
  vector<int> a(n + 1);
  for (int i = 0; i < (int)n; ++i) cin >> a[i];
  a[n] = -1;
  int m = 1000;
  int stock = 0;
  for (int i = 0; i < (int)n; ++i) {
    if (a[i] > a[i + 1]) {
      m += stock * a[i];
      stock = 0;
    } else {
      int buy = m / a[i];
      stock += buy;
      m -= buy * a[i];
    }
  }
  cout << m << endl;
  return 0;
}
