#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> data(n);
  for (int i = 0; i < n; ++i) {
    cin >> data[i];
  }
  int g = 1000;
  int k = 0;
  for (int i = 0; i < n; ++i) {
    if (i == n - 1) {
      g += data[i] * k;
      k = 0;
    } else if (data[i] < data[i + 1]) {
      int num = g / data[i];
      g -= num * data[i];
      k += num;
    } else if (data[i] > data[i + 1]) {
      g += data[i] * k;
      k = 0;
    }
  }
  cout << g;
  return 0;
}
