#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long money = 1000;
  long long cnt = 0;
  long long num;
  for (long long i = 0; i < n; i++) {
    if (i == 0 and a[i] < a[i + 1]) {
      num = money / a[i];
      cnt += num;
      money -= num * a[i];
    } else if (i == n - 1 and a[i - 1] < a[i]) {
      money += cnt * a[i];
      cnt = 0;
    } else if (i - 1 > 0 and i + 1 < n and a[i - 1] >= a[i] and
               a[i] <= a[i + 1]) {
      num = money / a[i];
      cnt += num;
      money -= num * a[i];
    } else if (i - 1 > 0 and i + 1 < n and a[i - 1] <= a[i] and
               a[i] >= a[i + 1]) {
      money += cnt * a[i];
      cnt = 0;
    }
  }
  cout << money << endl;
  return 0;
}
