#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1001001001;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int pre, now;
  int rest = 1000, cnt = 0;
  cin >> pre;
  while (--n) {
    cin >> now;
    if (pre >= now)
      pre = now;
    else {
      cnt = rest / pre;
      rest += (now - pre) * cnt;
    }
    pre = now;
  }
  cout << rest << endl;
  return 0;
}
