#include <iostream>
using namespace std;

int main()
{
	int a,b,takahashi;
	((1<=a&&a<=12)&&(1<=b&&b<=31));
	cout << "write a date (mm dd) = "; 
	cin >> a >> b;
	
	if (a<=b){
		cout << "takahashi = " << a << endl;
	}
	else {
		cout << "takahashi = " << (a-1) << endl;
	}
}