#include
using namespace std;
int
main ()
{
int i, g, max = 0, a[2018];
for (i = 0; i < 2018; i++)
cin >> a[i];
for (i = 0; i < 2018; i++)
if (a[i] < 40)
{
if (a[i] > max)
max = a[i];
};
g = 10000 / max;
for (i = 0; i < 2018; i++)
if (a[i] < 40)
a[i] = a[i] * g;
for (i = 0; i < 2018; i++)
cout << a[i] << endl;</p>
return 0;
}