#include <bits/stdc++.h>
const int MAXN = 2e5 + 10;
const int mod = 1e14;
const long long INF = 0x7f7f7f7f7f7f7f7f;
const int inf = 0x3f3f3f3f;
using namespace std;
int a[100];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  int min1 = a[1];
  int ans = 1000;
  for (int i = 2; i <= n; i++) {
    if (a[i] > min1) {
      int sum = ans / min1, result = ans % min1;
      ans = sum * a[i] + result;
      min1 = a[i];
    }
    min1 = min(min1, a[i]);
  }
  printf("%d\n", ans);
  return 0;
}
