#include <bits/stdc++.h>
using namespace std;
using std::ios;
constexpr int MOD = 1e9 + 7;
constexpr int mod = 998244353;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long sum = 1000, st = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1]) {
      st += (sum / a[i]);
      sum = sum % a[i];
    } else if (a[i] > a[i + 1]) {
      sum += (st * a[i]);
      st = 0;
    }
  }
  if (st > 0 && a[n - 1] > a[n - 2]) sum += (st * a[n - 1]);
  cout << sum;
}
