#include <bits/stdc++.h>
using namespace std;
int a[105];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int n, s, cur = 1000;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n - 1; i++) {
    s = 0;
    if (a[i + 1] > a[i]) s = cur / a[i];
    cur += (a[i + 1] - a[i]) * s;
  }
  cout << cur;
}
