#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
const int INF = 2e9;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  int mon = 1000;
  int k = 0;
  for (int i = 0; i < (n - 1); i++) {
    if (a[i] < a[i + 1]) {
      k += mon / a[i];
      mon %= a[i];
    } else {
      mon += k * a[i];
      k = 0;
    }
  }
  mon += k * a[n - 1];
  cout << mon << endl;
}
