#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int N;
  cin >> N;
  vector<int> A(N, 0);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  int current_money = 1000;
  for (int i = 0; i < N - 1; i++) {
    int stock_count = 0;
    if (A[i] < A[i + 1]) stock_count = current_money / A[i];
    current_money += (A[i + 1] - A[i]) * stock_count;
  }
  cout << current_money;
  return 0;
}
