function main(weather) {

 
switch( weather ) {
    case 'SUN':
        console.log('1');
        break;
 
 
    case 'MON':
        console.log('2');
        break;
 
 
    case 'TUE':
        console.log('3');
        break;
    

    case 'WED':
        console.log('4');
        break;
 
 
    case 'THU':
        console.log('5');
        break;
 
 
    case 'FRI':
        console.log('6');
        break;


    case 'SAT':
        console.log('7');
        break;


    console.log(input);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));