#include <bits/stdc++.h>
int INF = 1e9 + 7;
unsigned NthDayOfWeekToDay(unsigned n, unsigned dow, unsigned dow1) {
  unsigned day;
  if (dow < dow1) dow += 7;
  day = dow - dow1;
  day += 7 * n - 6;
  return day;
}
signed gcd(int x, int y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
signed lcm(int x, int y) { return x / gcd(x, y) * y; }
unsigned DayToWeekNumber(unsigned day) { return (day - 1) / 7 + 1; }
unsigned AnotherDayOfWeek(unsigned day, unsigned day0, unsigned dow0) {
  return (dow0 + 35 + day - day0) % 7;
}
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  int a = 1000;
  int b = 1000000;
  for (int i = 0; i < (int)(N); i++) cin >> A[i];
  for (int i = 0; i < (int)(N); i++) {
    for (int j = i + 1; j < N; j++) {
      if (A[i] >= b) break;
      if (A[j] > A[i]) {
        a += (a / A[i]) * (A[j] - A[i]);
        i = j;
        b = A[j];
        continue;
      }
    }
  }
  cout << a << endl;
}
