#include <bits/stdc++.h>
using namespace std;
int a[200010];
int main() {
  int k, n;
  int money, stock;
  while (scanf("%d", &n) != EOF) {
    money = 1000;
    stock = 0;
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
    }
    for (int i = 1; i < n; i++) {
      if (a[i] <= a[i + 1]) {
        stock += money / a[i];
        money %= a[i];
      } else {
        money += stock * a[i];
        stock = 0;
      }
    }
    money += stock * a[n];
    printf("%d\n", money);
  }
  return 0;
}
