#include <bits/stdc++.h>
using namespace std;
const int INF = 2e9;
const long long ML = 4e18;
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = (0); i < (n); ++i) cin >> a[i];
  int r = 1000, s = 0;
  for (int i = (0); i < (n - 1); ++i) {
    if (a[i] < a[i + 1]) {
      s += r / a[i];
      r %= a[i];
    } else if (a[i] > a[i + 1]) {
      r += s * a[i];
      s = 0;
    }
  }
  r += s * a[n - 1];
  cout << r;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  solve();
  return 0;
}
