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