#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e3 + 50;
int n;
long long a[maxn];
int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  long long ans = 1000;
  int maxx = a[1], minn = a[1];
  for (int i = 2; i <= n; ++i) {
    if (a[i] >= a[i - 1]) {
      maxx = a[i];
    } else {
      if (maxx == minn) continue;
      int cnt = ans / minn, cnt1 = ans % minn;
      ans = cnt1 + cnt * maxx;
      minn = a[i];
      maxx = a[i];
    }
  }
  if (maxx != minn) {
    int cnt = ans / minn, cnt1 = ans % minn;
    ans = cnt1 + cnt * maxx;
  }
  cout << ans << endl;
  return 0;
}
