Problem:
Score : 100 points

Problem Statement

Given is a string S representing the day of the week today.

S is SUN, MON, TUE, WED, THU, FRI, or SAT, for Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday, respectively.

After how many days is the next Sunday (tomorrow or later)?

Constraints

S is SUN, MON, TUE, WED, THU, FRI, or SAT.

Input

Input is given from Standard Input in the following format:

S

Output

Print the number of days before the next Sunday.

Sample Input 1

SAT

Sample Output 1

1

It is Saturday today, and tomorrow will be Sunday.

Sample Input 2

SUN

Sample Output 2

7

It is Sunday today, and seven days later, it will be Sunday again.

Solution in C (GCC 5.4.1) (judge verdict: Accepted)

/*#include<stdio.h>

int main(){

    char S[3];

    scanf("%s",S);
  	printf("%s",S);

    if (S[1] == "SUN")
        if (S[2] == "N") printf("7");
        else if (S[2] == "E") printf("5");
    else if (S[1] =="O" ) printf("6");
    else if (S[1] == "E") printf("4");
    else if (S[1] == "H") printf("3");
    else if (S[1] == "R") printf("2");
    else if (S[1] == "A") printf("1");
    
    return 0;
}*/

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

int main(){

    char S[3];

    scanf("%s",S);
  	//printf("%s",S[1]);

    if (strncmp(S,"SUN",3) == 0) printf("7");
    else if (strncmp(S,"MON",3) == 0) printf("6");
    else if (strncmp(S,"TUE",3) == 0) printf("5"); 
    else if (strncmp(S,"WED",3) == 0) printf("4");
    else if (strncmp(S,"THU",3) == 0) printf("3");
    else if (strncmp(S,"FRI",3) == 0) printf("2");
    else if (strncmp(S,"SAT",3) == 0) printf("1");
    
    return 0;
}