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