#include <bits/stdc++.h>
using namespace std;
long long int power(long long int a, long long int b) {
  long long int res = 1;
  a = a % 1000000007;
  while (b > 0) {
    if (b & 1) {
      res = (res * a) % 1000000007;
      b--;
    }
    a = (a * a) % 1000000007;
    b >>= 1;
  }
  return res;
}
long long int gcd(long long int a, long long int b) {
  return (b == 0) ? a : gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n;
  cin >> n;
  vector<long long int> v(n);
  for (long long int i = 0; i < n; i++) cin >> v[i];
  long long int prof = 0;
  long long int buy = v[0];
  long long int cash = 1000;
  long long int sell = 0;
  int f = 0;
  for (long long int i = 1; i < n; i++) {
    if (v[i] < v[i - 1]) {
      if (f == 1) {
        cash += (sell - buy) * (cash / buy);
        buy = 0;
        f = 0;
        continue;
      }
      buy = v[i];
    } else if (v[i] == v[i - 1]) {
      if (f == 1)
        sell = v[i];
      else
        buy = v[i];
    } else {
      if (buy == 0) {
        buy = v[i];
        continue;
      }
      sell = v[i];
      f = 1;
    }
  }
  if (f == 1) cash += (sell - buy) * (cash / buy);
  cout << cash << "\n";
}
