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