#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<pair<int, int>> diff;
  int _min = 400;
  for (int i = (0); i < (N); ++i) {
    if (_min > A[i])
      _min = A[i];
    else if (A[i - 1] <= A[i])
      continue;
    else {
      diff.push_back(make_pair(_min, A[i - 1]));
      _min = 400;
    }
  }
  if (_min != 400) diff.push_back(make_pair(_min, A.back()));
  int money = 1000;
  for (int i = (0); i < (diff.size()); ++i) {
    int f = diff[i].first;
    int s = diff[i].second;
    int cnt = money / f;
    money += cnt * (s - f);
  }
  cout << money << endl;
  return 0;
}
