#include <bits/stdc++.h>
using namespace std;
using vint = vector<int>;
using pii = pair<int, int>;
using pdd = pair<long double, long double>;
using vpii = vector<pii>;
const int N = 2e5 + 5;
const int Inf = 1e9 + 7;
const int Mod = 1e9 + 7;
const long double eps = 1e-9;
void io() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  cerr.tie(NULL);
}
int n, a[N];
signed main() {
  io();
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  int x = 1000;
  for (int i = 0; i < n - 1; ++i) {
    if (a[i] < a[i + 1]) {
      x = x % a[i] + (x / a[i]) * a[i + 1];
    }
  }
  cout << x;
}
