#include <bits/stdc++.h>
using namespace std;
bool isprime(int n) {
  if (n == 1) return false;
  if (n == 2 || n == 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (int i = 5; i * i <= n; i += 6) {
    if ((n % i == 0) || (n % (i + 2) == 0)) return false;
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int n;
  cin >> n;
  int a1;
  vector<int> v1(n);
  long long sum = 1000, p = 0;
  for (int i = 0; i < n; ++i) {
    cin >> v1[i];
  }
  int k = 0;
  for (int i = 0; i < n - 1; ++i) {
    if (v1[i] < v1[i + 1] && v1[i + 1] > k) {
      p = sum / v1[i];
      k = v1[i + 1];
      sum = sum - (v1[i] * p);
      sum += (v1[i + 1] * p);
    }
  }
  cout << sum << endl;
  return 0;
}
