#include <bits/stdc++.h>
using namespace std;
long long mod(long long a, long long b) {
  long long ret = a % b;
  if (ret < 0) ret += b;
  return ret;
}
long long modpow(long long a, long long b, long long c) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = mod(res * a, c);
    a = mod(a * a, c);
    b >>= 1;
  }
  return res;
}
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int money = 1000, stock = 0;
  int sa[n - 1];
  for (int i = 0; i < n - 1; i++) {
    sa[i] = a[i + 1] - a[i];
  }
  for (int i = 0; i < n - 1; i++) {
    if (sa[i] == 0) continue;
    if (sa[i] < 0) {
      money += stock * a[i];
      stock = 0;
    }
    if (sa[i] > 0) {
      int temp = money;
      money = temp % a[i];
      stock += temp / a[i];
    }
  }
  money += stock * a[n - 1];
  cout << money << endl;
  return 0;
}
