#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  int cnt = 1000;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n - 1; i++) {
    long long ans = 0;
    if (a[i] < a[i + 1]) ans = cnt / a[i];
    cnt += (a[i + 1] - a[i]) * ans;
  }
  cout << cnt << endl;
  return 0;
}
