
import std.algorithm;
import std.conv;
import std.stdio;
import std.string;

void main()
{
	auto ab = readln.split.map!( to!int );
	
	writeln( solve( ab[ 0 ], ab[ 1 ] ) );
}

int solve( in int a, in int b )
{
	return ( a <= b ) ? a : a - 1;
}

unittest
{
	assert( solve( 5, 5 ) == 5 );
	assert( solve( 2, 1 ) == 1 );
	assert( solve( 11, 30 ) == 11 );
}
