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