#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>

typedef  long long ll;

ll a[81];
ll n, x = 1000, b;
int main()
{
	scanf("%lld", &n);

	for (ll i = 1; i <= n; i++) scanf("%lld", a + i);

	for (ll i = 1; i < n; i++)
		if (a[i + 1] > a[i]) 
		{
			b = x / a[i];
			x %= a[i];
			b *= a[i + 1];
			x += b;
		}

	printf("%lld\n", x);
	return 0;
}