#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
using namespace std;
int a[82];
int main() {
  int n, s = 0, x = 1000;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  n = unique(a, a + n) - a;
  for (int i = 0; i < n; i++) {
    if (i < n - 1 && a[i + 1] > a[i] && (i == 0 || a[i - 1] > a[i])) {
      int y = x / a[i];
      x -= a[i] * y, s += y;
    }
    if (i && a[i - 1] < a[i] && (i == n - 1 || a[i + 1] < a[i])) {
      x += s * a[i];
      s = 0;
    }
  }
  printf("%d\n", x);
  return 0;
}
