#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
bool xor_logic(bool x, bool y) { return (x && y) || (!x && !y); }
int solve(vector<int>& A) {
  int money = 1000;
  int tmp_min = A[0];
  int tmp_max = A[0];
  for (size_t i = 1; i < A.size(); i++) {
    if (A[i] > tmp_max) {
      money += (A[i] - tmp_min) * (int)(money / tmp_min);
      tmp_min = A[i];
      tmp_max = A[i];
    } else {
      tmp_min = min(tmp_min, A[i]);
    }
  }
  return money;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  std::vector<int> A(N, 0);
  for (size_t i = 0; i < N; i++) {
    cin >> A[i];
  }
  int ans = solve(A);
  cout << ans << endl;
  return 0;
}
