#include <bits/stdc++.h>
using namespace std;
long long power(long long x, long long y) {
  long long ret = 1;
  while (y > 0) {
    if (y & 1) ret = (ret * x);
    y /= 2;
    x = (x * x);
  }
  return ret;
}
vector<long long> divs(long long n) {
  vector<long long> ret;
  for (int i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      if (i * i == n) {
        ret.push_back(i);
      } else {
        ret.push_back(i);
        ret.push_back(n / i);
      }
    }
  }
  return ret;
}
void solve() {
  long long n, i, j, k;
  cin >> n;
  vector<long long> vec(n);
  for (i = 0; i < n; i++) {
    cin >> vec[i];
  }
  long long profit = 0;
  long long money = 1000;
  for (i = 0; i < n; i++) {
    bool f = 0;
    for (j = i + 1; j < n; j++) {
      if (vec[j] > vec[i]) {
        f = 1;
        break;
      }
    }
    while (vec[j + 1] == vec[j] && j < n) j++;
    if (f) {
      long long buy = money / vec[i];
      money %= vec[i];
      money += vec[j] * buy;
    }
    i = j;
  }
  cout << money << '\n';
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0);
  long long test = 1;
  while (test--) {
    solve();
  }
}
