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