#include <stdio.h>
#include <string.h>

int main(){
	int y;
	char s[5];
	scanf("%d/%s", &y, s);
	printf("%d/%s", y+=1, s);
	return 0;
}
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
	char s[4]={};
	cin>>s;
	if(s[0]=='S'){
		if(s[1]=='U'){
			cout<<7<<endl;
		}else{
			cout<<1<<endl;
		}
	}else if(s[0]=='M'){
		cout<<6<<endl;
	}else if(s[0]=='W'){
		cout<<4<<endl;
	}else if(s[0]=='F'){
		cout<<2<<endl;
	}else if(s[0]=='T'){
		if(s[1]=='U'){
			cout<<5<<endl;
		}else{
			cout<<3<<endl;
		}
	}
}