#include<iostream>
#include<conio.h>
using namespace std;
class RoozClass
{
	public :
		int m;
		int GetNoOfRooz()
		{
			if(m >= 1 && m <= 6)
				return 31;
			else
				if(m >= 7 && m <= 11)
					return 30;
				else
					if(m == 12)
						return 29;
					else
						return 0;
		}
};

int main()
{
	RoozClass A;
	cout << "Shomare Mah ra vared konid : ";
	cin >> A.m;
	if (A.GetNoOfRooz() == 0)
		cout << "ERROR";
	else
		cout << "mah " << A.GetNoOfRooz() << " rooz ast" << endl;
	getch();
}

