#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
void buy(int &money, int &k_num, int value) {
  k_num = money / value;
  money -= k_num * value;
  return;
}
void sell(int &money, int &k_num, int value) {
  money += k_num * value;
  k_num = 0;
  return;
}
int main() {
  int n;
  cin >> n;
  vector<int> b(n + 1);
  for (int i = 0; i < (n); i++) cin >> b[i];
  b[n] = 0;
  vector<int> a(1);
  a[0] = b[0];
  for (int i = 0; i < (n); i++)
    if (b[i] != b[i + 1]) a.push_back(b[i + 1]);
  int l = a.size();
  if (l == 1) {
    cout << 1000 << endl;
    return 0;
  }
  a.push_back(0);
  int m = 1000;
  int k = 0;
  vector<int> f(l - 1);
  for (int i = 0; i < (l - 1); i++) {
    if (a[i] < a[i + 1])
      buy(m, k, a[i]);
    else if (a[i] > a[i + 1] && a[i + 1] < a[i + 2])
      sell(m, k, a[i]);
  }
  sell(m, k, a[l - 2]);
  cout << m << endl;
  return 0;
}
