#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void readin(T &x) {
  x = 0;
  T fh = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') fh = -1;
  for (; isdigit(ch); ch = getchar()) x = (x << 1) + (x << 3) + (ch ^ 48);
  x *= fh;
}
inline void d_read(double &x) {
  x = 0.0;
  int fh = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') fh = -1;
  for (; isdigit(ch); ch = getchar()) x = x * 10 + (ch ^ 48);
  if (ch == '.') {
    double num = 1.0;
    ch = getchar();
    for (; isdigit(ch); ch = getchar()) x = x + (num /= 10) * (ch ^ 48);
  }
  x *= fh;
}
template <typename T>
inline void wt(T x) {
  if (x > 9) wt(x / 10);
  putchar(x % 10 + 48);
}
template <typename T>
inline void writeln(T x, char c) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  wt(x);
  putchar(c);
}
const int N = 105;
int a[N];
int main() {
  int n;
  readin(n);
  for (int i = 1; i <= n; i++) {
    readin(a[i]);
  }
  int res = 1000, st = 0;
  a[0] = 1e9;
  for (int i = 1; i <= n; i++) {
    if (a[i] >= a[i - 1] && a[i] > a[i + 1]) {
      res += st * a[i];
      st = 0;
    } else if (a[i] <= a[i - 1] && a[i] < a[i + 1]) {
      st = res / a[i];
      res = res - st * a[i];
    }
  }
  writeln(res, '\n');
  return 0;
}
