#include <bits/stdc++.h>
using namespace std;
const int N = 100;
int a[N], n;
int main() {
  ios::sync_with_stdio(false);
  cin.tie();
  cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  long long res = 1000;
  for (int i = 1; i <= n; i++) {
    int j = i;
    while (a[j + 1] > a[j]) j++;
    if (j > i) res = res / a[i] * a[j] + res % a[i];
    i = j + 1;
  }
  cout << res << endl;
  return 0;
}
