#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; 1 > 0 ? i < n : i > n; i += 1) cin >> a[i];
  int mon = 1000;
  int sto = 0;
  for (int i = 0; 1 > 0 ? i < n - 1 : i > n - 1; i += 1) {
    if (a[i] < a[i + 1]) {
      sto += mon / a[i];
      mon -= mon / a[i] * a[i];
    } else if (a[i] > a[i + 1]) {
      mon += sto * a[i];
      sto = 0;
    }
  }
  mon += sto * a[n - 1];
  cout << mon << '\n';
  return 0;
}
