#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int n;
  cin >> n;
  vector<int> a(n, 0);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  ll gold = 1000;
  int kb = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] < a[i + 1]) {
      kb = gold / a[i];
      gold = gold - a[i] * kb;
      gold = gold + a[i + 1] * kb;
      kb = 0;
    }
  }
  cout << gold << endl;
}
