#include<stdio.h>
#include<string.h>
int main()
{
	char s[10];
	scanf("%s",s);
	if(strcmp(s,"SAT")==0)
	{
		printf("1\n");
		printf("It is Saturday today, and tomorrow will be Sunday.\n");
	}
	if(strcmp(s,"SUN")==0) 
	{
		printf("7\n");
		printf("It is Sunday today, and seven days later, it will be Sunday again.\n");
	}
	if(strcmp(s,"MON")==0) 
	{
		printf("6\n");
		printf("It is Monday today, and six days later, it will be Sunday again.\n");
	}
	if(strcmp(s,"TUE")==0) 
	{
		printf("5\n");
		printf("It is Tuesday today, and five days later, it will be Sunday again.\n");
	}
	if(strcmp(s,"WED")==0) 
	{
		printf("4\n");
		printf("It is Wednesday today, and four days later, it will be Sunday again.\n");
	}
	if(strcmp(s,"THU")==0) 
	{
		printf("3\n");
		printf("It is Thursday today, and three days later, it will be Sunday again.\n");
	}
	if(strcmp(s,"FRI")==0) 
	{
		printf("2\n");
		printf("It is Friday today, and two days later, it will be Sunday again.\n");
	}
	return 0;
} 