#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e5 + 5;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  long long n, a, have = 0, sell = 0, c = 1000;
  cin >> n;
  vector<int> v(n);
  for (int i = (int)(0), sz = (int)(n); i < sz; i++) cin >> v[i];
  if (v[0] < v[1]) have = c / v[0], c %= v[0];
  for (int i = (int)(1), sz = (int)(n - 1); i < sz; i++) {
    if (v[i] <= v[i - 1] && v[i] < v[i + 1])
      have = c / v[i], c %= v[i];
    else if (v[i] >= v[i - 1] && v[i] > v[i + 1])
      c += have * v[i], have = 0;
  }
  c += have * v[n - 1];
  printf("%lld\n", c);
  return 0;
}
