#include <bits/stdc++.h>
const int MOD = 1331;
using namespace std;
const int N = 2e5 + 10;
int n;
int a[N];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  long long money = 1000, lv = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a[i + 1] == a[i]) continue;
    if (a[i + 1] > a[i]) {
      lv = money / a[i];
      money %= a[i];
    } else {
      money += lv * a[i];
      lv = 0;
    }
  }
  if (lv) {
    money += a[n - 1] * lv;
  }
  cout << money << endl;
  return 0;
}
