#include<iostream>
using namespace std;
//This program gets the number of day and the month in the Persian Calendar
//& determines where that date stands in the calendar
int main() {
	int d, m;
	cout << "Day = ";
	cin >> d;
	cout << "Month = ";
	cin >> m;
	int p;
	if (m>0 && m<7 && d>0 && d<32) {
		p = (m-1)*31 + d;
		cout << "Position = " << p;
	} else if (m>6 && m<13 && d>0 && d<31) {
		p = 186 + (m-7)*30 + d;
		cout << "Position = " << p;
	} else {
		cout << "Error: You have entered a wrong date!";
	}
	return 0;
}
