#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  int n;
  cin >> n;
  vector<int> v(n + 1);
  int max = 0;
  for (int i = 0; i < (n); ++i) {
    cin >> v[i];
    if (v[i] > max) max = v[i];
  }
  v[n] = 0;
  int m = 1000;
  int st = 0;
  for (int i = 0; i < (n); ++i) {
    if (v[i] == max) {
      m = m + st * v[i];
      st = 0;
      break;
    }
    if (v[i] < v[i + 1]) {
      st = m / v[i];
      m %= v[i];
    } else if (v[i] > v[i + 1]) {
      m = m + st * v[i];
      st = 0;
    }
  }
  cout << m << endl;
}
