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 (Python):
S = str(input())
if S == 'SUN':
    print(7)
elif S == 'MON':
    print(6)
elif S == 'TUE':
    print(5)
elif S == 'WED':
    print(4)
elif S == 'THU':
    print(3)
elif S == 'FRI':
    print(2)
elif S == 'SAT':
    print(1)

Solution (Python):
str = [input() for i in range(1)]

if str[0] == "SUN":
    print(7)
if str[0] == "MON":
    print(6)
if str[0] == "TUE":
    print(5)
if str[0] == "WED":
    print(4)
if str[0] == "THU":
    print(3)
if str[0] == "FRI":
    print(2)
if str[0] == "SAT":
    print(1)

Solution (Python):
S = input()

youbi = ["SAT","FRI","THU","WED","TUE","MON", "SUN"]
print(youbi.index(S) + 1)

Solution (Python):



s=input()

if(s=='MON'):
    print(6)
elif(s=='TUE'):
    print(5)
elif(s=='WED'):
    print(4)
elif(s=='THU'):
    print(3)
elif(s=='FRI'):
    print(2)
elif(s=='SAT'):
    print(1)
elif(s=='SUN'):
    print(7)

Solution (Python):
a = input()

if a == 'SUN':
  print(7)
elif a == 'MON':
  print(6)
elif a == 'TUE':
  print(5)
elif a == 'WED':
  print(4)
elif a == 'THU':
  print(3)
elif a == 'FRI':
  print(2)
elif a == 'SAT':
  print(1)

Solution (Python):
S = input()

if S == 'SUN':
  print(7)
elif S == 'MON':
  print(6)
elif S == 'TUE':
  print(5)
elif S == 'WED':
  print(4)
elif S == 'THU':
  print(3)
elif S == 'FRI':
  print(2)
elif S == 'SAT':
  print(1)

Solution (Python):
S = str(input())

date = ['SUN','MON','TUE','WED','THU','FRI','SAT']
date_idx = date.index(S)
print(7 - date_idx)

Solution (Python):
s = str(input())
s_dict = {'SUN':7,'MON':6,'TUE':5,'WED':4,'THU':3,'FRI':2,'SAT':1}
print(s_dict.get(s))

Solution (Python):
day = input()

daylist = ['SUN','MON','TUE','WED','THU','FRI','SAT']

for i, list in enumerate(daylist):
    if list == day and list == 'SUN':
        print(7)
    elif list == day:
        print(7-i)

Solution (Python):
S = input()
L = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
print(7-L.index(S))

Solution (Python):


S = input()

day = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
print(7 - day.index(S) % 7)

Solution (Python):
S = input()
L = ['SUN','MON','TUE','WED','THU','FRI','SAT']

for i, s in enumerate(L):
    if s == S:
        if s == 'SUN':
            print(7)
        else:
            print(7 - i)

Solution (Python):
S = input()

if S == "SUN":
    print(7)
if S == "MON":
    print(6)
if S == "TUE":
    print(5)
if S == "WED":
    print(4)
if S == "THU":
    print(3)
if S == "FRI":
    print(2)
if S == "SAT":
    print(1)

Solution (Python):
l = ["SUN","MON","TUE","WED","THU","FRI","SAT"]

s = input()

a = l.index(s)
print(7-a)

Solution (Python):
s = input()
if s == 'SUN':
    print(7)
elif s == 'MON':
    print(6)
elif s == 'TUE':
    print(5)
elif s == 'WED':
    print(4)
elif s == 'THU':
    print(3)
elif s == 'FRI':
    print(2)
else:
    print(1)

Solution (Python):
days = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
today = str(input())

if today in days:
    todayNum = days.index(today)
    remainder = 7 - todayNum
    print(remainder)

Solution (Python):
S = input()

if S == "SUN":
    print(7)
elif S == "MON":
    print(6)
elif S == "TUE":
    print(5)
elif S == "WED":
    print(4)
elif S == "THU":
    print(3)
elif S == "FRI":
    print(2)
elif S == "SAT":
    print(1)

Solution (Python):
s=input()
a=["SUN", "MON", "TUE", "WED", "THU", "FRI","SAT"]
b = a.index(s);
if(b==0):
  print(7)
else:
  print(7-b)

Solution (Python):
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from itertools import permutations, combinations,combinations_with_replacement,product
from fractions import Fraction as frac
import bisect
import heapq

import logging
logging.basicConfig(level=logging.DEBUG)

import sys


setrecursionlimit(1000000)

MOD = 10**9+7
INF = float('inf')

def main():
    S=input()
    A=['SUN','MON','TUE','WED','THU','FRI','SAT','SUN' ]

    print(7-A.index(S))
main()

Solution (Python):

from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())


TT = ["SUN","MON","TUE","WED","THU","FRI","SAT"]

S = input()

print(7-TT.index(S))

Solution (Python):
l=['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT','SUN']
s=input()
for i in range(7):
    if s==l[i]:
        if i==6:
            print(7)
            break
        print(6-i)

Solution (Python):
a = ["SUN", "MON" , "TUE", "WED", "THU", "FRI", "SAT"]

s = input()

for i in range(7):
    if s == a[i]:
        print(7-i)

Solution (Python):
if __name__ == "__main__":
	S = input()
	W = ['SUN','MON','TUE','WED','THU','FRI','SAT']

	pre_ans = int(W.index(S))
	print(7-pre_ans)

Solution (Python):

import sys
sys.setrecursionlimit(200000)
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def fi(): return float(input())
def mfi(): return map(float, input().rstrip().split())
def lmfi(): return list(map(float, input().rstrip().split()))
def li(): return list(input().rstrip())
def debug(*args, sep=" ", end="\n"): print("debug:", *args, file=sys.stderr, sep=sep, end=end) if not __debug__ else None
def exit(*arg): print(*arg); sys.exit()



def main():
    S = input().rstrip()
    if S == "SAT":
        print(1)
    elif S == "MON":
        print(6)
    elif S == "TUE":
        print(5)
    elif S == "WED":
        print(4)
    elif S == "THU":
        print(3)
    elif S == "FRI":
        print(2)
    elif S == "SUN":
        print(7)
    return


if __name__ == '__main__':
    main()

Solution (Python):
S = input()

if S == "SUN":
    print("7")

elif S == "MON":
    print("6")

elif S == "TUE":
    print("5")

elif S == "WED":
    print("4")

elif S == "THU":
    print("3")

elif S == "FRI":
    print("2")

else:
    print("1")

Solution (Python):
N = input()
nan = {'SUN':7,'MON':6,'TUE':5,'WED':4,'THU':3,'FRI':2,'SAT':1}
print(nan[N])

Solution (Python):
def main():
	a = {"SUN" : 0,
	"SAT" : 6,
	"FRI" : 5,
	"THU" : 4, 
	"WED" : 3,
	"TUE" : 2,
	"MON" : 1}
	s = input()
	print(7-a[s.strip()])
	
main()

Solution (Python):
S=input()
w_dict = {'SUN':0,'MON':1,'TUE':2,'WED':3,'THU':4,'FRI':5,'SAT':6}
print(7 - w_dict[S])

Solution (Python):
s = input()

if s == "SUN": print(7)
if s == "MON": print(6)
if s == "TUE": print(5)
if s == "WED": print(4)
if s == "THU": print(3)
if s == "FRI": print(2)
if s == "SAT": print(1)

Solution (Python):
day_list=["SAT","FRI","THU","WED","TUE","MON","SUN"]
S=input()
day=day_list.index(S)+1
print(day)

Solution (Python):
s = input()

if s == 'SUN':
    print(7)
elif s == 'MON':
    print(6)
elif s == 'TUE':
    print(5)
elif s == 'WED':
    print(4)
elif s == 'THU':
    print(3)
elif s == 'FRI':
    print(2)
elif s == 'SAT':
    print(1)

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

S = read().rstrip().decode('utf-8')

D = 'SUN,MON,TUE,WED,THU,FRI,SAT'.split(',')

dic = {x:7 - i%7 for i,x in enumerate(D)}

answer = dic[S]
print(answer)

Solution (Python):
day = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
S = input()
i = day.index(S)
print(7-i)

Solution (Python):
S = input()
lst = {"MON":0,"TUE":1,"WED":2,"THU":3,"FRI":4,"SAT":5,"SUN":6}

ans = lst[S]
if ans == 6:
    print(7)
else:
    print(7-ans-1)

Solution (Python):
S = input()

if S == 'SUN':
  print(7)
elif S == 'MON':
  print(6)
elif S == 'TUE':
  print(5)
elif S == 'WED':
  print(4)
elif S == 'THU':
  print(3)
elif S == 'FRI':
  print(2)
else:
  print(1)

Solution (Python):
import sys
s = sys.stdin.readline().rstrip()
L = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI' ,'SAT']

for idx, w in enumerate(L):
    if s ==w:
        print(7-idx)

Solution (Python):
my_map = {
    "SUN": 7,
    "MON": 6,
    "TUE": 5,
    "WED": 4,
    "THU": 3,
    "FRI": 2,
    "SAT": 1,
}
s = input()
print(my_map[s])

Solution (Python):
S = input()
weeks = {'SUN': 7, 'MON': 6, 'TUE': 5, 'WED': 4, 'THU': 3, 'FRI': 2, 'SAT': 1}

if S in weeks:
    print(weeks[S])

Solution (Python):
S = input()

day = ['SUN','MON','TUE','WED','THU','FRI','SAT']
ss = 0
for i in range(7):
    if S==day[i]:
        ss = abs(7-i)

print(ss)

Solution (Python):

s=input()
if s=="SUN":
    print(7)
elif s=="MON":
    print(6)
elif s=="TUE":
    print(5)
elif s=="WED":
    print(4)
elif s=="THU":
    print(3)
elif s=="FRI":
    print(2)
else:
    print(1)

Solution (Python):
s = input()

if s == 'SUN':
  print("7")
  exit()
if s == 'MON':
  print("6")
  exit()
if s == 'TUE':
  print("5")
  exit()
if s == 'WED':
  print("4")
  exit()
if s == 'THU':
  print("3")
  exit()
if s == 'FRI':
  print("2")
if s == 'SAT':
  print("1")

Solution (Python):
inputs = input()
num = 0
if inputs == "SUN":
    num = 7
elif inputs == "MON":
    num = 6
elif inputs == "TUE":
    num = 5
elif inputs == "WED":
    num = 4
elif inputs == "THU":
    num = 3
elif inputs == "FRI":
    num = 2
elif inputs == "SAT":
    num = 1

print(num)

Solution (Python):
s = input()
 
all_ = ['SUN','MON','TUE','WED','THU','FRI','SAT']
 
 
for i in range(7):
    if all_[i] == s:
        break
        
print(7-i)

Solution (Python):
S = input()

if S == "SUN":
    print(7)
elif S == "MON":
    print(6)
elif S == "TUE":
    print(5)
elif S == "WED":
    print(4)
elif S == "THU":
    print(3)
elif S == "FRI":
    print(2)
elif S == "SAT":
    print(1)

Solution (Python):
names = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
s = input().strip()
for j,name in enumerate(names):
  if s == name:
    print(7-j)

Solution (Python):
import sys
S = input()
a_list =["MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN"]
count = 0
m = 0
if S == "SUN":
    print(7)
    sys.exit(0)
for i in a_list:
    if m == 1:
        count += 1
    if S == i:
        m += 1
print(count)

Solution (Python):
S = input()

if S == "SAT":
    print(1)
elif S == "FRI":
    print(2)
elif S == "THU":
    print(3)
elif S == "WED":
    print(4)
elif S == "TUE":
    print(5)
elif S == "MON":
    print(6)
else:
    print(7)

Solution (Python):

import sys

def _s(): return sys.stdin.readline().strip()

m = {
    "MON":6,
    "TUE":5,
    "WED":4,
    "THU":3,
    "FRI":2,
    "SAT":1,
    "SUN":7
}
s = _s()
print(m[s])

Solution (Python):
S=input()
if S =="SUN":
  print(7)
if S=="MON":
  print(6)
if S=="TUE":
  print(5)
if S=="WED":
  print(4)
if S=="THU":
  print(3)
if S=="FRI":
  print(2)
if S=="SAT":
  print(1)

Solution (Python):
s = input()

days = ["SAT", "FRI", "THU", "WED", "TUE", "MON", "SUN"]

for x in days:
    if(s == x):
        print(days.index(x)+1)

Solution (Python):
S = input()

if S =="SUN":
  print(7)
elif S =="MON":
  print(6)
elif S =="TUE":
  print(5)
elif S =="WED":
  print(4)
elif S =="THU":
  print(3)
elif S =="FRI":
  print(2)
elif S =="SAT":
  print(1)

Solution (Python):
week = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
print(7-week.index(input()))

Solution (Python):

S=input()

ref=["MON" ,"TUE" ,"WED" ,"THU", "FRI" ,"SAT" ,"SUN"]
x=0
for i in range(7):
    if S==ref[i]:
        x=7-i-1
if x==0:
    x=7
print(x)

Solution (Python):
week = str(input())

if week == "SUN":
    print(7)
elif week == "MON":
    print(6)
elif  week == "TUE":
    print(5)
elif  week == "WED":
    print(4)
elif  week == "THU":
    print(3)
elif  week == "FRI":
    print(2)
else:
    print(1)

Solution (Python):
s = input()

dic = {
    "SUN":7,
    "MON":6,
    "TUE":5,
    "WED":4,
    "THU":3,
    "FRI":2,
    "SAT":1
}

ans = dic[s]
print(ans)

Solution (Python):
dic = {'SUN': 0, 'MON': 1, 'TUE': 2, 'WED': 3, 'THU': 4, 'FRI': 5, 'SAT': 6}
S = input()
print(7 - (dic[S]))

Solution (Python):
S = input()
week_list = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
print(7 - week_list.index(S))

Solution (Python):
s = input()
if s == "SUN":
  print (7)
elif s == "MON":
  print (6)
elif s == "TUE":
  print (5)
elif s == "WED":
  print (4)
elif s == "THU":
  print (3)
elif s == "FRI":
  print (2)
else:
  print (1)

Solution (Python):
S = input()
day = {
    "SUN" : 7,
    "MON" : 6,
    "TUE" : 5,
    "WED" : 4,
    "THU" : 3,
    "FRI" : 2,
    "SAT" : 1,
}
print(day[S])

Solution (Python):
S = str(input())
if S == 'SUN':
    ans = 7
elif S == 'SAT':
    ans =1
elif S == 'FRI':
    ans =2
elif S == 'THU':
    ans =3
elif S == 'WED':
    ans =4
elif S == 'TUE':
    ans =5
elif S == 'MON':
    ans =6
print(ans)

Solution (Python):
S=input()
if S== 'SUN':
    print(7)
elif S=='MON':
    print(6)
elif S=='TUE':
    print(5)
elif S=='WED':
    print(4)
elif S=='THU':
    print(3)
elif S == 'FRI':
    print(2)
elif S == 'SAT':
    print(1)

Solution (Python):
t=input()
if(t=='SUN'):
    print(7)
elif(t=='MON'):
    print(7-1)
elif(t=='TUE'):
    print(7-2)
elif(t=='WED'):
    print(7-3)
elif(t=='THU'):
    print(7-4)
elif(t=='FRI'):
    print(7-5)
elif(t=='SAT'):
    print(7-6)

Solution (Python):
n = str(input())
dic = {"SUN":7 ,"MON":6,"TUE":5,"WED":4,"THU":3,"FRI":2,"SAT":1}
print(dic[n])

Solution (Python):
s = input()

weekdays = ['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN']

idx = weekdays.index(s)

ans = 7 - (idx + 1) % len(weekdays)

print(ans)

Solution (Python):
def main(x: str):
    weekdays = {
        'SAT': 1,
        'SUN': 7,
        'MON': 6,
        'TUE': 5,
        'WED': 4,
        'THU': 3,
        'FRI': 2,
    }
    print(weekdays[x])


if __name__ == '__main__':
    
    

    main(input())

Solution (Python):
S = input()


def next_sun(S):
    m = {
        'SUN': 7,
        'MON': 6,
        'TUE': 5,
        'WED': 4,
        'THU': 3,
        'FRI': 2,
        'SAT': 1
    };
    return m[S]

print(next_sun(S))

Solution (Python):
import sys
s = input()

if s=="SUN":
  print("7")
  sys.exit()

if s=="MON":
  print("6")
  sys.exit()

if s=="TUE":
  print("5")
  sys.exit()

if s=="WED":
  print("4")
  sys.exit()
  
if s=="THU":
  print("3")
  sys.exit()

if s=="FRI":
  print("2")
  sys.exit()
  
if s=="SAT":
  print("1")
  sys.exit()

Solution (Python):
weekdays = ['SUN','MON','TUE','WED','THU','FRI','SAT']
S = input()

for idx, day in enumerate(weekdays):
    if day == S:
        print(7 - idx)
        break

Solution (Python):
a = input()
b = 0

if a == 'SAT':
  b=1
elif a=='MON':
  b=6
elif a=='TUE':
  b=5
elif a=='WED':
  b=4
elif a=='THU':
  b=3
elif a=='FRI':
  b=2
else :
  b=7

print(b)

Solution (Python):
S = input()
youbi = ['SUN','MON','TUE','WED','THU','FRI','SAT']
print(7-youbi.index(S))

Solution (Python):
week=["SUN","MON","TUE","WED","THU","FRI","SAT"]

n=input()
i=0
for i in range(len(week)):
    if week[i]==n:
        print(7-i)

    else:
        pass

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def main():
    s=input()
    if s=="SUN":ans=7
    if s=="MON":ans=6
    if s=="TUE":ans=5
    if s=="WED":ans=4
    if s=="THU":ans=3
    if s=="FRI":ans=2
    if s=="SAT":ans=1
    print(ans)
main()

Solution (Python):
week =  ['SUN','MON','TUE','WED','THU','FRI','SAT' ]

day = input()

output = 7 - week.index(day)

print(output)

Solution (Python):
wd = {'SUN' : 7, "SAT": 1, "FRI": 2, "THU": 3, "WED": 4, "TUE": 5, "MON": 6}
S = input()
print(wd[S])

Solution (Python):
S = input()

youbi = ["SUN","MON","TUE","WED","THU","FRI","SAT"]

for i in range(len(youbi)):
    if S == youbi[i]:
        print(7-i)

Solution (Python):
S = input()

week = {'SUN': 0,
        'MON': 1,
        'TUE': 2,
        'WED': 3,
        'THU': 4,
        'FRI': 5,
        'SAT': 6}


today = week[S]

if today > 0:
    nextsunday = 7 - today
elif today == 0:
    nextsunday = 7
print(nextsunday)

Solution (Python):
s=input()
if s=="SUN":
    print("7")
if s=="MON":
    print("6")
if s=="TUE":
    print("5")
if s=="WED":
    print("4")
if s=="THU":
    print("3")
if s=="FRI":
    print("2")
if s=="SAT":
    print("1")

Solution (Python):
S = input()

if S == 'SUN':
  ans = 7
elif S == 'MON':
  ans = 6
elif S == 'TUE':
  ans = 5
elif S == 'WED':
  ans = 4
elif S == 'THU':
  ans = 3
elif S == 'FRI':
  ans = 2
elif S == 'SAT':
  ans = 1

print(ans)

Solution (Python):
S = input()
day_dict = {"SUN" : 7,
            "MON" : 6,
            "TUE" : 5,
            "WED" : 4,
            "THU" : 3,
            "FRI" : 2,
            "SAT" : 1}

print(day_dict[S])

Solution (Python):
import sys
input = sys.stdin.readline

s = input()

if s == "SUN\n":
  print("7")
elif s == "MON\n":
  print("6")
elif s == "TUE\n":
  print("5")
elif s == "WED\n":
  print("4")
elif s == "THU\n":
  print("3")
elif s == "FRI\n":
  print("2")
elif s == "SAT\n":
  print("1")

Solution (Python):
s = input()

if s == "SUN":
    ans = 7
elif s == "MON":
    ans = 6    
elif s == "TUE":
    ans = 5
elif s == "WED":
    ans = 4
elif s == "THU":
    ans = 3
elif s == "FRI":
    ans = 2
elif s == "SAT":
    ans = 1

print(ans)

Solution (Python):
from operator import mul
from functools import reduce
from collections import Counter


















import sys

sys.setrecursionlimit(2000)


def inpl():
    return list(map(int, input().split()))



def cmb(n, r):
    
    if n < r:
        return 0
    r = min(n - r, r)
    if r == 0:
        return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1, r + 1))
    return over // under


def gcd(a, b):
    
    while b > 0:
        a, b = b, a % b

    return a


def lcm(a, b):
    
    return a * b // gcd(a, b)


S = input()

A = ['k', 'SAT', 'FRI', 'THU', 'WED', 'TUE', 'MON', "SUN"]

print(A.index(S))

Solution (Python):
from collections import defaultdict, deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys
import random
import itertools
import math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt


def LI(): return list(map(int, input().split()))


def LF(): return list(map(float, input().split()))


def LI_(): return list(map(lambda x: int(x)-1, input().split()))


def II(): return int(input())


def IF(): return float(input())


def LS(): return list(map(list, input().split()))


def S(): return list(input().rstrip())


def IR(n): return [II() for _ in range(n)]


def LIR(n): return [LI() for _ in range(n)]


def FR(n): return [IF() for _ in range(n)]


def LFR(n): return [LI() for _ in range(n)]


def LIR_(n): return [LI_() for _ in range(n)]


def SR(n): return [S() for _ in range(n)]


def LSR(n): return [LS() for _ in range(n)]


def gcd(x, y):
    if y == 0:
        return x
    return gcd(y, x % y)


def my_index_multi(l, x):
    return [i for i, _x in enumerate(l) if _x == x]


def sosu(x):
    for i in range(2, int(sqrt(x)+1)):
        if x % i == 0:
            return False
    return True


mod = 1000000007
inf = float('INF')


def A():
    youbi = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
    S = input()
    S=S[:-1]
    print(7-youbi.index(S))

    return




def B():
    N = II()
    S = input()
    if len(S) % 2 == 0:
        print('No')
        return
    j = S[N//2]
    p = N//2
    for i in S[:N//2]:
        if i != j:
            print('No')
            return
        p += 1
        j = S[p]

    print('Yes')

    return




def C():
    N = II()
    x = [0]*N
    y = [0]*N
    for i in range(N):
        x[i], y[i] = LI()
    ans = 0
    for j in range(N-1):
        for k in range(j+1, N):
            len = sqrt(((x[j]-x[k])*(x[j]-x[k]))+((y[j]-y[k])*(y[j]-y[k])))
            ans += len
    ans = ans*2/N
    print(ans)

    return




def D():

    a, b, x = LI()
    BIG = a*a*b/2
    if x > BIG:
        y = 2*b-(2*x/a/a)
        print(math.degrees(math.atan(y/a)))
    else:
        y = 2*x/a/b
        print(math.degrees(math.atan(b/y)))
    return




def E():
    N, K = LI()
    A = LI()
    F = LI()
    A.sort(reverse=True)
    F.sort()
    cost = []
    for i in range(len(N)):
        cost.append(A[i]*F[i])

    a = F[cost.index(max(cost))]

    return




def F():
    N, M = LI()

    value = [0] * M
    power = [0] * M
    for i in range(M):
        a, b = LI()
        value[i] = a
        c = LI()
        L = ['0'] * N
        for k in c:
            L[k - 1] = '1'
        bint = ''.join(L)
        power[i] = int(bint, 2)
    bint = ''.join(list(['1'] * N))
    dp = [inf] * (int(bint, 2)+1)
    t = 0
    cost = 0

    dp[0] = 0
    for s in range(int(bint, 2) + 1):
        for i in range(M):
            t = s | power[i]
            cost = dp[s] + value[i]
            dp[t] = min(dp[t], cost)
    print(-1) if(dp[-1] == inf) else print(dp[-1])

    return

    



def solution(S):
    
    N = len(S)

    pass



if __name__ == '__main__':
    A()

Solution (Python):
x = str(input())

if x == "SUN":
    print("7\n")
elif x == "MON":
    print("6\n")
elif x == "TUE":
    print("5\n")
elif x == "WED":
    print("4\n")
elif x == "THU":
    print("3\n")
elif x == "FRI":
    print("2\n")
elif x == "SAT":
    print("1\n")

Solution (Python):
day_list = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]


def cnt(S):
    return 7 - day_list.index(S)


if __name__ == "__main__":
    S = input()
    print(cnt(S))

Solution (Python):
def printdays():
    week = [ "SUN","MON","TUE","WED","THU","FRI","SAT"]
    today = input()
    for i, day in enumerate(week):
        if day==today:
            break
    days = 7-i
    print(days)
if __name__ == "__main__":
    printdays()

Solution (Python):
S=input()
S=str(S)
W=['SUN','MON','TUE','WED','THU','FRI','SAT']
for i,j in enumerate(W):
  if j==S:
    print(7-i)

Solution (Python):
def solve():
    S = input()
    day = ["MON","TUE","WED","THU","FRI","SAT","SUN"]
    for i in range(len(day)):
        if S == "SUN":
            print(7)
            break
        elif S == day[i]:
            print(6-i)
            break
if __name__ == '__main__':
    solve()

Solution (Python):
s = str(input())

if s == "SUN":
    print("7")
elif s == "MON":
    print("6")
elif s == "TUE":
    print("5")
elif s == "WED":
    print("4")
elif s == "THU":
    print("3")
elif s == "FRI":
    print("2")
elif s == "SAT":
    print("1")

Solution (Python):
s = input()
if s == 'SAT':
	print(1)
elif s == 'FRI':
	print(2)
elif s == 'THU':
	print(3)
elif s == 'WED':
	print(4)
elif s == 'TUE':
	print(5)
elif s == 'MON':
	print(6)
elif s == 'SUN':
	print(7)

Solution (Python):
S = input()
ans = (
    7 if S == "SUN" else
    6 if S == "MON" else
    5 if S == "TUE" else
    4 if S == "WED" else
    3 if S == "THU" else
    2 if S == "FRI" else
    1
)

print(ans)

Solution (Python):
S=input()
ans=0
if S=="MON":
  ans=6
elif S=="TUE":
  ans=5
elif S=="WED":
  ans=4
elif S=="THU":
  ans=3
elif S=="FRI":
  ans=2
elif S=="SAT":
  ans=1
else:
  ans=7
print(ans)

Solution (Python):
day = str(input())

days = ["SAT","FRI","THU","WED","TUE","MON","SUN"]

for d in days:
    if(day == d):
        print(days.index(d) + 1)

Solution (Python):
S = input()

ref = ['SUN','MON','TUE','WED','THU','FRI','SAT']

print(7 - int(ref.index(S)))

Solution (Python):
S=input()
week=["SUN","MON","TUE","WED","THU","FRI","SAT"]
print(7-week.index(S))

Solution (Python):
weeks = {'SUN': 7, 'MON': 6, 'TUE': 5, 'WED': 4, 'THU': 3, 'FRI': 2, 'SAT': 1}
print(weeks[input()])

Solution (Python):
li = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
s = int(li.index(input()))
print(7-s)

Solution (Python):
S = input()

if S == 'SUN':
    a = 0
if S == 'MON':
    a = 1
if S == 'TUE':
    a = 2
if S == 'WED':
    a = 3
if S == 'THU':
    a = 4
if S == 'FRI':
    a = 5
if S == 'SAT':
    a = 6
    
print( 7-a )

Solution (Python):
str = input()
if str == 'SUN':
  print(7)
elif str == 'MON':
  print(6)
elif str == 'TUE':
  print(5)
elif str == 'WED':
  print(4)
elif str == 'THU':
  print(3)
elif str == 'FRI' :
  print(2)
elif str == 'SAT':
  print(1)

Solution (Python):
day_dict = {"SUN": 0,"MON": 1,"TUE": 2,"WED": 3,"THU": 4,"FRI": 5,"SAT": 6}
S = input()
print(7 - day_dict[S])

Solution (Python):
s=input()
week=['MON','TUE','WED','THU','FRI','SAT','SUN']
if s!='SUN':
  print(6-week.index(s))
else:
  print(7)

Solution (Python):
print(list(reversed(['SUN','MON','TUE','WED','THU','FRI','SAT'])).index(input())+1)

Solution (Python):
weeks = {
    'SUN': 7,
    'MON': 6,
    'TUE': 5,
    'WED': 4,
    'THU': 3,
    'FRI': 2,
    'SAT': 1
}

s = input()
print(weeks[s])

Solution (Python):
day = input()
     
if(day=="SUN"):
  print(7)
elif(day=="MON"):
  print(6)
elif(day=="TUE"):
  print(5)
elif(day=="WED"):
  print(4)
elif(day=="THU"):
  print(3)
elif(day=="FRI"):
  print(2)
elif(day=="SAT"):
  print(1)

Solution (Python):
s = input()
if (s == "SUN"):
    print(7)
elif s == "MON":
    print(6)
elif s == "TUE":
    print(5)
elif s == "WED":
    print(4)
elif s == "THU":
    print(3)
elif s == "FRI":
    print(2)
elif s == "SAT":
    print(1)

Solution (Python):
s=input()
days={"SUN":7,"SAT":1,"FRI":2,"THU":3,"WED":4,"TUE":5,"MON":6}
print(days[s])

Solution (Python):
days = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
S = input()
print(7 - days.index(S))

Solution (Python):
S=input()
if S=='SUN':
  print('7')
if S=='MON':
  print('6')
if S=='TUE':
  print('5')
if S=='WED':
  print('4')
if S=='THU':
  print('3')
if S=='FRI':
  print('2')
if S=='SAT':
  print('1')

Solution (Python):
Day=["MON","TUE","WED","THU","FRI","SAT","SUN"] 
S=input()
if S=="SUN":
    print(7)
else:
    ans=Day.index(S)
    print(6-ans)

Solution (Python):
s = input()
day = ['SUN','MON','TUE','WED','THU','FRI','SAT']
print(7-day.index(s))

Solution (Python):
S = input()
if S=="SUN":
  print(7)
elif S=="MON":
  print(6)
elif S=="TUE":
  print(5)
elif S=="WED":
  print(4)
elif S=="THU":
  print(3)
elif S=="FRI":
  print(2)
elif S=="SAT":
  print(1)

Solution (Python):


s=input()
if s=='SUN':
    print(7)
if s=='MON':
    print(6)
if s=='TUE':
    print(5)
if s=='WED':
    print(4)
if s=='THU':
    print(3)
if s=='FRI':
    print(2)
if s=='SAT':
    print(1)

Solution (Python):
x = ['SAT', 'FRI', 'THU', 'WED', 'TUE', 'MON', 'SUN']
print(x.index(input()) + 1)

Solution (Python):
s = input()
arr = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']

print(7 - arr.index(s))

Solution (Python):
day=input()
if (day=="SUN"):
  print(7)
elif (day=="MON"):
  print(6)
elif (day=="TUE"):
  print(5)
elif(day=="WED"):
  print(4)
elif(day=="THU"):
  print(3)
elif(day=="FRI"):
  print(2)
elif(day=="SAT"):
  print(1)

Solution (Python):
S = str(input())
day = ['SUN','MON','TUE','WED','THU','FRI','SAT']
print(7-day.index(S))

Solution (Python):
S = input()
ans = 0
if S == 'SUN':
    ans = 7
if S == 'MON':
    ans = 6
if S == 'TUE':
    ans = 5
if S == 'WED':
    ans = 4
if S == 'THU':
    ans = 3
if S == 'FRI':
    ans = 2
if S == 'SAT':
    ans = 1

print(ans)

Solution (Python):
s=input()
if s=='SUN':
    print(7)
elif s=='MON':
    print(6)
elif s=='TUE':
    print(5)
elif s=='WED':
    print(4)
elif s=='THU':
    print(3)
elif s=='FRI':
    print(2)
else:
    print(1)

Solution (Python):
ans = dict()
ans["SUN"]=7
ans["MON"]=6
ans["TUE"]=5
ans["WED"]=4
ans["THU"]=3
ans["FRI"]=2
ans["SAT"]=1

s = input()
print(ans[s])

Solution (Python):
w = input()
week = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
i = 0
while i < 7:
  if w == week[i]:
    print( 7-i )
    break
  else:
    i += 1

Solution (Python):
"""Can't Wait for Holiday
https://atcoder.jp/contests/abc146/tasks/abc146_a
"""
S = input()
day_until_holiday = {'SUN': 7, 'MON': 6, 'TUE': 5, 'WED': 4, 'THU': 3, 'FRI': 2, 'SAT': 1}
print(day_until_holiday.get(S))

Solution (Python):

import sys
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = lambda *something : print(*something) if DEBUG else 0
DEBUG = False
def main(given = sys.stdin.readline):
    input = lambda : given().rstrip()
    LMIIS = lambda : list(map(int,input().split()))
    II = lambda : int(input())
    XLMIIS = lambda x : [LMIIS() for _ in range(x)]


    S = input()
    case = {'SUN':7,'MON':6,'TUE':5,'WED':4,'THU':3,'FRI':2,'SAT':1}
    print(case[S])




if __name__ == '__main__':
    main()

Solution (Python):
s = input()

weekDays = {'SUN':7,'MON':6,'TUE':5,'WED':4,'THU':3,'FRI':2,'SAT':1}

val = weekDays[s]
print(val)

Solution (Python):
s = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
n = [7, 6, 5, 4, 3, 2, 1]
S = input()
i = s.index(S)
print(n[i])

Solution (Python):
S = str(input())

if S == 'SUN':
    print(7)
elif S == 'MON':
    print(6)
elif S == 'TUE':
    print(5)
elif S == 'WED':
    print(4)
elif S == 'THU':
    print(3)
elif S == 'FRI':
    print(2)
elif S == 'SAT':
    print(1)

Solution (Python):
S = input()
d = {
    'SAT': 1,
    'FRI': 2,
    'THU': 3,
    'WED': 4,
    'TUE': 5,
    'MON': 6,
    'SUN': 7
}
print(d[S])

Solution (Python):
S = input()
if S == 'SUN':
  mark = 7
elif S == 'MON':
  mark = 6
elif S == 'TUE':
  mark = 5
elif S == 'WED':
  mark = 4
elif S == 'THU':
  mark = 3
elif S == 'FRI':
  mark = 2
elif S == 'SAT':
  mark = 1
print(mark)

Solution (Python):
date = input()
if date == "SUN":
    print(7)
elif  date == "MON":
    print(6)
elif  date == "TUE":
    print(5)
elif  date == "WED":
    print(4)
elif  date == "THU":
    print(3)
elif  date == "FRI":
    print(2)
else:
    print(1)

Solution (Python):
import sys

S = input()

if S == 'SUN':
    print('7')
elif S == 'MON':
    print('6')
elif S == 'TUE':
    print('5')
elif S == 'WED':
    print('4')
elif S == 'THU':
    print('3')
elif S == 'FRI':
    print('2')
elif S == 'SAT':
    print('1')

Solution (Python):
S = input()

if S == 'SUN':
	print('7')
elif S == 'MON':
	print('6')
elif S == 'TUE':
	print('5')
elif S == 'WED':
	print('4')
elif S == 'THU':
	print('3')
elif S == 'FRI':
	print('2')
elif S == 'SAT':
	print('1')

Solution (Python):
s=input()
d=['SAT','FRI','THU','WED','TUE','MON','SUN']

print(d.index(s)+1)

Solution (Python):
count=0
S = input()
L=['SUN','MON','TUE','WED','THU','FRI','SAT']
for i in range(7):
    if S == L[i]:
        count=i
        break
kotae=7-count
print(kotae)

Solution (Python):
s=input()
if s=="SUN":
  print(7)
elif s=="MON":
  print(6)
elif s=="TUE":
  print(5)
elif s=="WED":
  print(4)
elif s=="THU":
  print(3)
elif s=="FRI":
  print(2)
  
elif s=="SAT":
  print(1)

Solution (Python):
s = input()
if s == 'SUN':
    print('7')
elif s == 'MON':
    print('6')
elif s == 'TUE':
    print('5')
elif s == 'WED':
    print('4')
elif s == 'THU':
    print('3')
elif s == 'FRI':
    print('2')
else:
    print('1')

Solution (Python):
S = input()
d_w = ["SUN","MON","TUE","WED","THU","FRI","SAT"]

for i in range(len(d_w)):
  if S == d_w[i]:
    print(7 - i)
    break

Solution (Python):
N = input()

if N == "SUN":
    print("7")
elif N == "MON":
    print("6")
elif N == "TUE":
    print("5")
elif N == "WED":
    print("4")
elif N == "THU":
    print("3")
elif N == "FRI":
    print("2")
else:
    print("1")