#include <bits/stdc++.h>
const long long MAXN = 105;
long long p[MAXN];
int main() {
  long long T, M = 1000;
  std::cin >> T;
  for (long long i = 1; i <= T; ++i) {
    std::cin >> p[i];
  }
  for (long long i = 1; i <= T; ++i) {
    if (p[i] < p[i + 1]) {
      long long tot = M / p[i];
      if (tot == 0) {
        continue;
      }
      M %= p[i];
      if (i < T && p[i] < p[i + 1]) {
        ++i;
      }
      M += tot * p[i];
    }
  }
  std::cout << M;
  puts("");
  return 0;
}
