#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using v1 = vector<int>;
using vl = vector<long long>;
using v2 = vector<vector<int>>;
using v3 = vector<vector<char>>;
int main() {
  int n;
  cin >> n;
  v1 a(n + 1);
  for (int i = 0; i < (n); ++i) {
    cin >> a[i + 1];
  }
  ll x = 1000;
  int m = 0;
  for (int i = 1; i <= n - 1; i++) {
    x += a[i] * m;
    if (a[i + 1] > a[i]) {
      m = x / a[i];
      x %= a[i];
    }
  }
  if (m != 0) x += m * a[n];
  cout << x << endl;
}
