#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = 1e9;
int main(void) {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = (0); i < (N); ++i) cin >> A[i];
  vector<int> idx;
  for (int i = (1); i < (N); ++i) {
    if (A[i - 1] < A[i]) idx.push_back(i);
  }
  int money = 1000;
  for (int i = (0); i < (idx.size()); ++i) {
    int price = A[idx[i] - 1];
    int feture = A[idx[i]];
    int cnt = money / price;
    money -= cnt * price;
    money += cnt * feture;
  }
  cout << money << endl;
  return 0;
}
