#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;
  ll rest = 1000;
  int cnt = 0;
  cin >> pre;
  while (--n) {
    cin >> now;
    cnt = rest / pre;
    rest += max(0, (now - pre)) * cnt;
    pre = now;
  }
  cout << rest << endl;
  return 0;
}
