#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int i, n, s, x;
  x = 1000;
  s = 0;
  cin >> n;
  int a[n];
  map<int, int> m;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    m[a[i]]++;
  }
  for (i = 0; i < n; i++) {
    if (i > 0) {
      if (a[i] < a[i - 1]) {
        x += s * a[i - 1];
        s = 0;
      }
    }
    auto it = m.end();
    it--;
    if (it->first > a[i]) {
      s += x / a[i];
      x -= (x / a[i]) * a[i];
    } else if (it->first == a[i]) {
      x += s * a[i];
      s = 0;
    }
    m[a[i]]--;
    if (m[a[i]] == 0) m.erase(a[i]);
  }
  cout << x;
  return 0;
}
