#include <bits/stdc++.h>
using namespace std;
int main() {
  long n, a[80] = {0}, money = 1000, num_stocks = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    num_stocks = money / a[i];
    money += num_stocks * max(a[i + 1] - a[i], 0L);
  }
  cout << money << endl;
  return 0;
}
