#include <bits/stdc++.h>
using namespace std;
const long long inf = long long(1e18) + 1;
int main() {
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < (int)n; i++) {
    cin >> a[i];
  }
  int many = 1000;
  int count = 0;
  for (int i = 0; i < (int)n - 1; i++) {
    if (a[i] <= a[i + 1]) {
      count = many / a[i];
      many -= count * a[i];
      many += a[i + 1] * count;
      count = 0;
    }
  }
  cout << many << endl;
  return 0;
}
