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