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