#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
const int INT_INF = 2147483647;
const double PI = acos(-1.0);
const long long LLMAX = 9223372036854775805;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int cu = 1000;
  int stock = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] < a[i + 1]) {
      stock = cu / a[i];
      cu += (a[i + 1] - a[i]) * stock;
    }
  }
  cout << cu << endl;
}
