#include <bits/stdc++.h>
using namespace std;
const long long LINF = 1LL << 60;
const int INF = 1001001001;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  int money = 1000;
  int stock = 0;
  for (int i = 0; i < (n - 1); i++) {
    if (a[i + 1] > a[i]) {
      int buy = money / a[i];
      money -= buy * a[i];
      stock += buy;
    }
    if (a[i + 1] < a[i]) {
      money += stock * a[i];
      stock = 0;
    }
  }
  cout << money << endl;
  return 0;
}
