#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
const int MOD = 1e9 + 7;
long long a[N];
int b[N];
char s[N];
char t[N];
long long f[N];
int used[15];
int cmp1(long long a, long long b) { return b < a; }
multiset<int> ss;
map<int, int> mp;
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  if (a[2] > a[1]) b[1] = 2;
  for (int i = 2; i <= n - 1; i++) {
    if (a[i - 1] <= a[i] && a[i + 1] < a[i]) b[i] = 1;
  }
  long long stock = 0;
  long long money = 1000;
  for (int i = 2; i <= n - 1; i++) {
    if (a[i - 1] >= a[i] && a[i + 1] > a[i]) b[i] = 2;
  }
  for (int i = 1; i <= n - 1; i++) {
    if (b[i] == 1) {
      money = money + stock * a[i];
      stock = 0;
    } else if (b[i] == 2) {
      stock = money / a[i];
      money = money - stock * a[i];
    }
  }
  money += stock * a[n];
  cout << money << endl;
}
