unittest
{
	assert( [ "9 12" ].parse.expand.solve == 21 );
	assert( [ "19 0" ].parse.expand.solve == 19 );
	assert( [ "23 2" ].parse.expand.solve == 1 );
}



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 ab = input.front.split.to!( long[] );
	return tuple( ab[ 0 ], ab[ 1 ] );
}

auto solve( long a, long b )
{
	return ( a + b ) % 24;
}
