#include <bits/stdc++.h>
using namespace std;
const int maxn = 209;
int n;
int a[maxn];
int f[maxn];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  f[0] = 1000;
  for (int i = 1; i <= n; ++i) {
    f[i] = f[0];
    for (int j = 1; j < i; ++j) {
      f[i] = max(f[i], f[j]);
      f[i] = max(f[i], f[j] / a[j] * a[i] + f[j] % a[j]);
    }
  }
  printf("%d\n", f[n]);
  return 0;
}
