#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int ans = 1000;
  int x = 0;
  priority_queue<int, vector<int>, greater<int> > q;
  for (int i = 1; i <= n; i++) {
    int s;
    cin >> s;
    x = 0;
    q.push(s);
    q.push(s);
    x = ans / q.top();
    ans += x * s - x * q.top();
    q.pop();
  }
  cout << ans << endl;
  ;
}
