#include <bits/stdc++.h>
using namespace std;
using lint = long long int;
using P = pair<int, int>;
using PL = pair<lint, lint>;
constexpr int MOD = 1000000007;
constexpr int INF = 2147483647;
void yes(bool expr) { cout << (expr ? "Yes" : "No") << "\n"; }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = (0), i_end_ = (N); i < i_end_; i++) cin >> A[i];
  int money = 1000;
  int stock = 0;
  for (int i = (0), i_end_ = (N); i < i_end_; i++) {
    if (i == N - 1 || A[i + 1] < A[i]) {
      money += stock * A[i];
      stock = 0;
    } else {
      if (stock == 0) {
        stock = money / A[i];
        money -= stock * A[i];
      }
    }
  }
  cout << money << endl;
}
