#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1e9;
const int MOD = 1e9 + 7;
int main() {
  int N;
  cin >> N;
  int a[N];
  for (int i = 0; i < N; i++) cin >> a[i];
  int money = 1000;
  for (int i = 0; i < N - 1; i++) {
    int stocks = 0;
    if (a[i] < a[i + 1]) {
      stocks = money / a[i];
      money -= a[i] * stocks;
    }
    money += stocks * a[i + 1];
  }
  cout << money << endl;
  return 0;
}
