#include <bits/stdc++.h>
using namespace std;
const int maxl = 3e5 + 10;
int n, m, cas, k, cnt, tot, ans;
int a[maxl], b[maxl];
char s[maxl];
bool in[maxl];
inline void prework() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
}
inline void mainwork() {
  cnt = 0;
  ans = 1000;
  int d;
  a[n + 1] = 0;
  for (int i = 1; i <= n; i++) {
    d = ans / a[i];
    cnt += d;
    ans -= d * a[i];
    if (a[i + 1] < a[i]) ans += cnt * a[i], cnt = 0;
  }
}
inline void print() { printf("%d", ans); }
int main() {
  int t = 1;
  for (cas = 1; cas <= t; cas++) {
    prework();
    mainwork();
    print();
  }
  return 0;
}
