#include <bits/stdc++.h>
using namespace std;
void test(int r) {
  int n;
  cin >> n;
  vector<int> v(n);
  int i, j;
  for (i = 0; i < n; i++) cin >> v[i];
  int rm = 0, ns = 1, ps = 1000;
  for (i = 0; i < n; i++) {
    int t = ns * ps + rm;
    if (ps < v[i]) {
      ps = v[i];
    } else {
      ns = t / v[i];
      rm = t % v[i];
      ps = v[i];
    }
  }
  cout << ns * ps + rm << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1, r;
  for (r = 1; r <= t; r++) test(r);
  return 0;
}
