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