#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  vector<int> vec;
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    vec.push_back(x);
  }
  int have = 1000;
  for (int i = 1; i < n; i++) {
    if (vec[i] > vec[i - 1]) {
      int val = (have / vec[i - 1]);
      have %= vec[i - 1];
      have += vec[i] * val;
    }
  }
  cout << have << endl;
  return 0;
}
