#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(0);
  long long n, a[100], money = 1000, gupiao = 0;
  cin >> n;
  for (long long i = 0; i < (n); i++) cin >> a[i];
  for (long long i = 0; i < n - 1; i++) {
    if (a[i] >= a[i + 1]) continue;
    gupiao += (money / a[i]);
    money = money % a[i];
    money += gupiao * a[i + 1];
    gupiao = 0;
    i += 2;
  }
  cout << money;
  return 0;
}
