#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  int sum = 1000;
  int kabu = 0;
  int a[80] = {0};
  int mina = 300;
  int maxa = 0;
  cin >> n;
  for (int(i) = 0; (i) < (n); (i)++) {
    cin >> a[i];
  }
  for (int(i) = 0; (i) < (n - 1); (i)++) {
    if (a[i] > a[i + 1]) {
      sum += kabu * a[i];
      kabu = 0;
    }
    if (a[i] < a[i + 1]) {
      kabu = sum / a[i];
      sum %= a[i];
    }
  }
  maxa = *max_element(a + 0, a + n);
  cout << sum + maxa * kabu << endl;
  return 0;
}
