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