#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> a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  int m = 1000;
  int k = 0;
  int cnt = 0;
  vector<int> f(n);
  for (int i = 0; i < (n - 1); i++) {
    if (a[i] < a[i + 1])
      f[i] = 1;
    else if (a[i] > a[i + 1])
      f[i] = -1;
    else
      f[i] = 0;
  }
  f[n - 1] = -1;
  for (int i = 0; i < (n); i++) {
    if (f[i] == 1) buy(m, k, a[i]);
    if (f[i] == -1) sell(m, k, a[i]);
  }
  cout << m << endl;
  return 0;
}
