unittest
{
	assert( [ "20" ].parse.expand.solve == 15800 );
	assert( [ "60" ].parse.expand.solve == 47200 );
}



import std.conv;
import std.range;
import std.stdio;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto n = input.front.to!( long );
	return tuple( n );
}

auto solve( long n )
{
	return 800 * n - 200 * ( n / 15 );
}
