#include <bits/stdc++.h>
#pragma warning(disable : 4996)
int i_dsort(const void* a, const void* b);
int i_asort(const void* a, const void* b);
int _gcd(int a, int b);
int _swp(int* a, int* b);
int _cknum(char* a, int n);
int _atoi(char* s, int len);
int s_asort(const void* a, const void* b);
int s_dsort(const void* a, const void* b);
int s_asort(const void* a, const void* b) {
  return (strcmp((char*)a, (char*)b));
}
int s_dsort(const void* a, const void* b) {
  return (strcmp((char*)b, (char*)a));
}
int i_dsort(const void* a, const void* b) { return (*(int*)b - *(int*)a); }
int i_asort(const void* a, const void* b) { return (*(int*)a - *(int*)b); }
int i_gcd(int a, int b);
int i_gcd(int a, int b) {
  if (!b) return a;
  return i_gcd(b, a % b);
}
int i_lcm(int a, int b);
int i_lcm(int a, int b) { return (a * b) / i_gcd(a, b); }
int ll_gcd(long long a, long long b);
int ll_gcd(long long a, long long b) {
  if (!b) return a;
  return ll_gcd(b, a % b);
}
int ll_lcm(long long a, long long b);
int ll_lcm(long long a, long long b) { return (a * b) / ll_gcd(a, b); }
int _swp(int* a, int* b) {
  int tmp;
  tmp = *b;
  *b = *a;
  *a = tmp;
  return 0;
}
int _cknum(char* a, int n) {
  int i;
  char t = '0';
  for (i = 0; i < n; i++) {
    if (a[i] < '0' || a[i] > '9') return 1;
  }
  return 0;
}
int _atoi(char* s, int len) {
  char tmp[20];
  memcpy(tmp, s, len);
  tmp[len] = 0x00;
  return (atoi(tmp));
}
int _sort(const void* a, const void* b);
int _sort(const void* a, const void* b) {
  char rc;
  rc = strcmp((char*)b, (char*)a);
  if (rc == 0) {
    *(char*)a = 0x00;
    return (1);
  }
  return (rc);
}
int bitcount(unsigned int uc);
int bitcount(unsigned int uc) {
  int bit;
  for (bit = 0; 0 != uc; uc = (unsigned int)(uc >> 1))
    if (0 != (uc & 1)) ++bit;
  return bit;
}
int _sumdig(int n);
int _sumdig(int n) {
  int sum = 0;
  while (n > 0) {
    sum += n % 10;
    n /= 10;
  }
  return (sum);
}
int main(void) {
  int n, i;
  long long a[81];
  long long c = 1000, ans = 1000, tmp = 0, cnt = 0;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%lld", &a[i]);
  }
  for (i = 0; i < n; i++) {
    if (tmp == a[i]) continue;
    if (tmp < a[i] && tmp) {
      c += (long long)cnt * a[i];
      tmp = a[i];
      ans = c;
    } else {
      cnt = c / a[i];
      c = c % a[i];
      tmp = a[i];
    }
  }
  printf("%lld\n", ans);
  return 0;
}
