#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < (n); ++i) cin >> v[i];
  int y = 1000;
  for (int i = 0; i < (n); ++i) {
    int s = v[i];
    int t = y / v[i];
    while (i < n && v[i] <= v[i + 1]) i++;
    y = (y - t * s) + (t * v[i]);
  }
  cout << y << endl;
}
