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 == '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 = 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)
else:
  print(-1)

Solution (Python):
s = input()
day = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
num = 7
for i in day:
    if i == s:
        print(num)
    num -= 1

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

print(7 - day.index(S))

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)
else:
  	print (1)

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))

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

s = input()

print(7-LL.index(s))

Solution (Python):
S = input()
days = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
for i, j in enumerate(days):
    if S == j:
        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):
def solve():
    S = input()
    d = {'SUN': 7,
        'MON': 6,
        'TUE': 5,
        'WED': 4,
        'THU': 3,
        'FRI': 2,
        'SAT': 1
        
    }
    return d[S]

print(solve())

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

Solution (Python):
def resolve():
    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)
resolve()

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

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

s = input()
for i,v in enumerate(day_of_week):
    if v == s:
        print(7-i)

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

else :
		print(7)

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

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

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

Solution (Python):
S = input()

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

Solution (Python):
import math

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

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

Solution (Python):
def main():
    week = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
    s = input()
    indx = week.index(s)
    diff = 7 - indx
    if diff == 0:
        diff = 7
    print(diff)


if __name__ == "__main__":
    main()

Solution (Python):
s=input()
n=1
day=["SAT","FRI","THU","WED","TUE","MON","SUN"]
for i in day:
  if s==i:
    print(n)
  n+=1

Solution (Python):
s = input()

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

i = l.index(s)

ans = abs(i - 7)

print(ans)

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

print(7 - week.index(s))

Solution (Python):
s = input()
week = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
i = 0
for c in week:
	i += 1
	if c == s:
		print(8-i)
		exit()

Solution (Python):
S = input()
flag = False
week = ['MON','TUE','WED','THU','FRI','SAT']
for i in range(6):
    if S==week[i]:
        flag = True
        print(6-i)
        break
if flag == False:
    print(7)

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):
sl = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
sl.reverse()
S = input()

for i in range(len(sl)):
    if (S == sl[i]):
        print(i+1)

Solution (Python):
t="SUN,MON,TUE,WED,THU,FRI,SAT"
s=t.split(",")
print((7-s.index(input())))

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

Solution (Python):
S=input()
W=['SUN','MON','TUE','WED','THU','FRI','SAT']
print(7-W.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):
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):
S = input()

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

for i, day in enumerate(days):
    if day == S:
        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)
else:
  print(1)

Solution (Python):
S = input()
 
st = ['SAT','FRI','THU','WED','TUE','MON','SUN']
 
for i in range(7):
  if S==st[i]:
    print(i+1)

Solution (Python):

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

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

weeks.index(s)
print(7 - weeks.index(s))

Solution (Python):
A = {'SU':7,'MO':6,'TU':5,'WE':4,'TH':3,'FR':2,'SA':1}
B = input()[0:2]
print(A.get(B))

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):
days = "SUN MON TUE WED THU FRI SAT".split()
print(7 - days.index(input()))

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

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


"""別解
S = input()
days = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
 
print(7 - days.index(S))
"""

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

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')
else:
    print('1')

Solution (Python):
S = input()


def judge(S):
    dow = 'SUN,MON,TUE,WED,THU,FRI,SAT'.split(',')
    for i in range(len(dow)):
        if (S == dow[i]):
            return 7 - i


print(judge(S))

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

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

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

if s == 'SUN':
    print(7)

else:
    print(7 - day.get(s))

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

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

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

if __name__ == "__main__":
    main()

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

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

Solution (Python):
print(dict(zip(["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"],[7, 6, 5, 4, 3, 2, 1],))[input()])

Solution (Python):


import sys
import math
import time

import collections
from collections import deque
import queue
import copy
import bisect


def dfs(s, prev, pre):
  val[s] += Ope[s] + prev
  for i in G[s]:
    if(i == pre):
      continue
    dfs(i, val[s], s)

def bfs(sx, sy, n):
  que = deque([[sy,sx]])
  while que:
    y,x = que.popleft()
    for i,j in D:
      if(x+i<0 or y+j<0 or x+i>W-1 or y+j>H-1):
        continue
      dist = G[y+j][x+i]
      if(G[y+j][x+i] != "X"):
        if(type(G[y+j][x+i]) is str):
          G[y+j][x+i] = G[y][x]+1
          que.append([y+j,x+i])
        elif(dist>G[y][x]+1):
          G[y+j][x+i] = G[y][x]+1
          que.append([y+j,x+i])
        







S = str(input())
ans = 0
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
else:
  ans = 1


print(ans)

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

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

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

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

Solution (Python):
s = input()

if s[0] == 'S':
    if s[1] == 'U':
        print(7)
    else:
        print(1)
elif s[0] == 'M':
    print(6)
elif  s[0] == 'T':
    if s[1] == 'U':
        print(5)
    else:
        print(3)
elif s[0] == 'W':
    print(4)
elif s[0] == 'F':
    print(2)

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

day_num = day_list.index(S)

print(7-day_num)

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()
lis = ["SUN","MON","TUE","WED","THU","FRI","SAT"]

ans = 7 - lis.index(s)
print(ans)

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

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

s = input()
if s == 'SUN':
    print(7)
else:
    print(7 - (week.index(s)+1))

Solution (Python):
s = input()

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

ans = 7 - lis.index(s)

print(ans)

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

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

print(7 - ss.index(s))

Solution (Python):
S = input()

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

num = days.index(S)

if S=='SUN':
    out=7

else:
    out=6 - num

print(str(out))

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):
a = str(input())
ar = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
print(7 - ar.index(a))

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

s = str(input())

if s == 'SUN':
  print(7)
else:
  print(d['SUN']-d[s])

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

Solution (Python):
S = input()
w_list = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
for i, w in enumerate(w_list):
  if w == S:
    print(7-i)
    exit()

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 = str(input())

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

if S!= 'SUN':
    print(7-dayList.index(S))
else:
    print(7)

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



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):
S=input()
A=["SUN","MON","TUE","WED","THU","FRI","SAT"]
print(7-A.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):
l = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
S = input()
num = l.index(S)
print(7 - num)

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

Solution (Python):
l= ["SUN","MON","TUE","WED","THU","FRI","SAT"]
s=input()
ans=0
for i in range(7):
  if s==l[i]:
    ans =(7-i)%8
print(ans)

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

Solution (Python):
from sys import stdin

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

s = stdin.readline().rstrip()

if s != "SUN":
    a = day[day.index(s):]
    for i in a[::-1]:
        day.insert(0, i)
    print(day.index("SUN"))
else:
    print(7)

Solution (Python):
S=input()

WEEK={'SUN':7,'MON':6,'TUE':5,'WED':4,'THU':3,'FRI':2,'SAT':1}
print(WEEK[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):
D = input()
YO = ["SUN","MON","TUE","WED","THU","FRI","SAT"]

ans = 7 - YO.index(D)
print(ans)

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

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):
day = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
s = input()
print(7-day.index(s))

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

print(week[input()])

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):
n = input()
list = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
x = 7
for item in list:
    if n == item:
        print(x)
    x -= 1

Solution (Python):

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

day = str(input())

if day == "SUN":
    result = 7
else:
    result = week.index("SUN") - week.index(day)

print(result)

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

ans = a.get(s)
print(ans)

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):
n = str(input())
list = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
x = 7
for item in list:
    if(n == item):
        print(x)
    x -= 1

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

for a in range(len(lis)):
    if lis[a]==s:
        break
ans=7-a
print(ans)

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

Solution (Python):
s = input()
if s == "SUN":
    print(7)
elif 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)

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[0]=='S':
    if S[1]=='U':
        print(7)
    else:
        print(1)
elif S[0]=='M':
    print(6)
elif S[0]=='T':
    if S[1]=='U':
        print(5)
    else:
        print(3)
elif S[0]=='W':
        print(4)
else:
        print(2)

Solution (Python):
s = input()

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

for i, day in enumerate(week):
    if s == day:
        print(7 - i)

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

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

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

s=input()
id1=-1
for i in range(len(l)):
  if l[i]==s:
    id1=i
    break
id2=-1
for i in range(id1+1,len(l)):
  if l[i]=="SUN":
    id2=i
    break
print(id2-id1)

Solution (Python):
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    s = str(readline().rstrip().decode('utf-8'))
    d = {v: 7 - i for i, v in enumerate(["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"])}
    print(d[s])


if __name__ == '__main__':
    solve()

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

Solution (Python):
s = input()
dic = {'SUN':7,'MON':6,'TUE':5,'WED':4,'THU':3,'FRI':2,'SAT':1}
ans = [v for k,v in dic.items() if k == s]
print (ans[0])

Solution (Python):
s = input()

week = ['SAT', 'FRI', 'THU', 'WED', 'TUE', 'MON', 'SUN']
for i, day in enumerate(week, start=1):
	if s == day:
		print(i)

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

Solution (Python):
s = input()

a = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
 
for i, a in enumerate(a):
    if a == s:
        print(7-i)
        break

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

print(7-memo.index(a))

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

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

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

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

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

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

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)
elif N == "SAT":
    print(1)

Solution (Python):
S = input()
day = ['','SAT','FRI','THU','WED','TUE','MON','SUN']
for i in range (8):
    if S == day[i]:
        print(i)
        exit()

Solution (Python):
s = input()

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

Solution (Python):
s = input()
d = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
print((7 - d.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)
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)
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()
t=["SUN","MON","TUE","WED","THU","FRI","SAT"]
for i in range(7):
    if s==t[i]:
        print(7-i)
        break

Solution (Python):
S = input()

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

ans = 7 - days.index(S)
print(ans)

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)
else:
  print(1)

Solution (Python):



if __name__ == '__main__':
    today=input()
    week=["SUN","MON","TUE","WED","THU","FRI","SAT"]
    week=week[::-1]
    print(week.index(today)+1)

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

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

print(d[s])

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

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

Solution (Python):
import sys

def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getlist():
    return list(map(int, input().split()))
import math
import heapq
from collections import defaultdict, Counter, deque
MOD = 10**9 + 7
INF = 10**15


def main():
    date = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
    print(7 - date.index(input().strip()))


if __name__ == '__main__':
    main()

"""
9999
3

2916
"""

Solution (Python):
week = 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()

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)
else :
  print(7)

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":
    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()

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

print(res)

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':
    n = 7
elif s == 'MON':
    n = 6
elif s == 'TUE':
    n = 5
elif s == 'WED':
    n = 4
elif s == 'THU':
    n = 3
elif s == 'FRI':
    n = 2
elif s == 'SAT':
    n = 1

print(n)

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)
else:
  print()

Solution (Python):
s = input()
w = 'SUNMONTUEWEDTHUFRISAT'
ans = (w.index('SAT')- w.index(s))/3
print(int(ans+1))

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

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

Solution (Python):
S = str(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):
print(["SAT", "FRI", "THU", "WED", "TUE", "MON", "SUN"].index(input())+1)

Solution (Python):
s = input()
l = ['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN']
if l.index(s) == 6:
    print(l.index(s) + 1)
else:
    print(len(l) - 1 - l.index(s))

Solution (Python):
S = input()

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

i = day.index(S)

print(7 - i)

Solution (Python):
s = input()

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

print(7 - c.index(s))

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

print(l[a])

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

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

S=input()

print(yobi[S])

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

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

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

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

for i in range(1,8):
    if s == l[i-1]:
        print(8-i)

Solution (Python):
l=[['SUN',7],['MON',6],['TUE',5],['WED',4],['THU',3],['FRI',2],['SAT',1]]
s=str(input())
for i in range(7):
  if s==l[i][0]:
    print(l[i][1])

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

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

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

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

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

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

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

Solution (Python):
S = input()
WEEK = ('MON','TUE','WED','THU','FRI','SAT','SUN')
i = WEEK.index(S)
answer = 6-i if i!=6 else 7
print(answer)

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

Solution (Python):
S = input()

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

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

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()
li = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
print(7 - li.index(s))

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

Solution (Python):
s = input()
list = ["hoge", "SAT", "FRI", "THU", "WED", "TUE", "MON", "SUN"]
print(list.index(s))

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

for i in range(len(dict)):
    if dict[i]==S:
        ans=6-i
        if ans==0:
            print(7)
        else:
            print(ans)
        break

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

S = input() 

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

Solution (Python):

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

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

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

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

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):
li = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
st = input()
print(7-li.index(st))

Solution (Python):
S = input()
li = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
for i in range(len(li)):
    if S == li[i] :
        print(7 - i)

Solution (Python):
s = input()

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

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

Solution (Python):
s = input()

l = 0
x= {"SUN":0,"MON":1,"TUE":2,"WED":3,"THU":4,"FRI":5,"SAT":6}
for k,v in x.items():
    if k == s:
       l = 7 - v
    else:
        pass
print(l)

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", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
for x in day:
    if x == s:
        print(len(day)-day.index(x))

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

Solution (Python):
s = input()

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

ans = 0

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