#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
const int inf = 0x3f3f3f3f;
int a[maxn];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int sell = 0, mon = 1000, flag = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i + 1] >= a[i]) {
      sell += mon / a[i];
      mon = mon % a[i];
    }
    if (a[i + 1] < a[i] && a[i - 1] <= a[i]) {
      mon = mon + sell * a[i];
      sell = 0;
    }
  }
  cout << mon << endl;
  return 0;
}
