#include <bits/stdc++.h>
using namespace std;
using Int = long long;
int PREP = (cin.tie(nullptr), ios::sync_with_stdio(false),
            cout << fixed << setprecision(9), 0);
int main() {
  int N;
  cin >> N;
  vector<Int> A(N);
  for (auto &a : A) cin >> a;
  Int stock = 0, money = 1000;
  for (int i = 0; i < N; i++) {
    if (i == N - 1 || A[i] > A[i + 1]) {
      money += stock * A[i];
      stock = 0;
    } else {
      int t = money / A[i];
      money -= A[i] * t;
      stock += t;
    }
  }
  cout << money << endl;
  return 0;
}
