#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pli = pair<ll, int>;
void Solve() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int cost = 1000, buy = 0;
  for (int i = 0; i < n - 1; i++) {
    while (i < n && a[i + 1] <= a[i]) i++;
    if (i == n) break;
    buy = cost / a[i];
    cost -= (buy * a[i]);
    while (i < n && a[i + 1] >= a[i]) i++;
    if (i == n) break;
    cost += (buy * a[i]);
    buy = 0;
  }
  if (buy != 0) cost += (buy * a[n - 1]);
  cout << cost << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  Solve();
  return 0;
}
