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

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

S = input()

print(week.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()

youbi =[ "MON","TUE","WED","THU","FRI","SAT","SUN" ]
nanitigo =youbi.index(S)
kotae =0
if S == "SUN":
    kotae = 7
else:
    kotae =6-nanitigo
print(kotae)

Solution (Python):

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

print(d[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()
l=['SUN','MON','TUE','WED','THU','FRI','SAT']
for i in range(7):
  if s==l[i]:print(7-i)

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

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

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

Solution (Python):
s = input()

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

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

Solution (Python):
N=input()
if N=='SUN':
  print("7")
if N=='MON':
  print("6")
if N=='TUE':
  print("5")
if N=='WED':
  print("4")
if N=='THU':
  print("3")
if N=='FRI':
  print("2")
if N=='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()
W = ['SUN','MON','TUE','WED','THU','FRI','SAT']
for i in range(1,8):
    if S == W[-i]:
        print(abs(-i))

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

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

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

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

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

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

Solution (Python):
s = input()

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

Solution (Python):


import sys
import math
import collections
import itertools
INF = 10 ** 10
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def gcd(x, y) : return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y) : return (x * y) // gcd(x, y)
def I() : return int(input())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def PL(L) : print(*L, sep="\n")

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

S = input()
d = weeks.index(S)

print(7 - d)

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

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

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

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

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

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

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

i=input()

if i in S:
  print(7-S.index(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()
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()
week = ['SUN','MON','TUE','WED','THU','FRI','SAT']
print(7 - week.index(S))

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

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

print(7 - week.index(S))

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

Solution (Python):
l = ['SUN','MON','TUE','WED','THU','FRI','SAT']
s = input()
i = l.index(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):
days = [' ', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN']
s = input()
if s == 'SUN':
    print(7)
    exit()
print(7-days.index(s))

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

Solution (Python):
S = input()

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

answer = answers.get(S)

print(answer)

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

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

a=input()

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

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

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

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

S = input()

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

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

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

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

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

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

Solution (Python):
import sys
input = sys.stdin.readline
from collections import Counter, deque

INF = float('inf')
weekly = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']


def main():
    S = input().rstrip()
    index = weekly.index(S)
    print(-(index - len(weekly)))


if __name__ == '__main__':
    main()

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

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

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

Solution (Python):


import sys














def main():
    mod = 10000007                  
    inf = float('inf')
    input = sys.stdin.readline      
    sys.setrecursionlimit(10**6)    
    def ii():  return int(input())
    def mi():  return map(int, input().rstrip().split())
    def lmi(): return list(map(int, input().rstrip().split()))
    def li():  return list(input().rstrip())
    
    s = input().rstrip()
    day =  ['SUN','MON','TUE','WED','THU','FRI','SAT']
    print(7 - day.index(s))

if __name__ == "__main__":
    main()

Solution (Python):
from sys import stdin

S = stdin.readline().rstrip()
days  = ["MON","TUE","WED","THU","FRI","SAT","SUN"]

if S == "SUN":
    print(7)
else:
    i = days.index(S)
    print(6 - i)

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

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

if s == "SUN":
    print(7)
    sys.exit()
for i in range(len(day_list)):
    if s == day_list[i]:
        print(i)

Solution (Python):
s=input()
days=["SUN","MON","TUE","WED","THU","FRI","SAT"]
for i in range(7):
    if s==days[i]:
        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()
List = ['SAT','FRI','THU','WED','TUE','MON','SUN']
for i in range (len(List)):
  if List[i] == S:
    print(i+1)

Solution (Python):
a= ["MON","TUE","WED","THU","FRI","SAT","SUN"]
s=raw_input()
idNum=a.index(s)
if idNum == 6:
  print 7
else:
  print 6- idNum

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

Solution (Python):

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

Solution (Python):
items = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
S = input()
print(*[7-i for i, ii in enumerate(items) if ii == S], sep = '\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)

Solution (Python):

s = input()
week = ["MON", "TUE", "WED", "THU", "FRI", "SAT","SUN"]

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

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

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

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

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

Solution (Python):
a = ('SUN,MON,TUE,WED,THU,FRI,SAT')
b = a.split(',')
n = input()
for i in range(7):
    if b[i] == n:
        ans = 7 - i  
        print(ans)

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()
days = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
days.reverse()
i = 0
while days[i] != S:
  i += 1
print(i + 1)

Solution (Python):

s = input()

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

print(7 - days.index(s))

Solution (Python):
import itertools
import fractions
def main():
  S = {'SUN':7, 'MON':6,'TUE':5,'WED':4,'THU':3,'FRI':2,'SAT':1}
  s = input()
  print(S[s])
if __name__ == '__main__':
  main()

Solution (Python):
S=input()

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

print(7-lis.index(S))

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"]
print(7-day.index(input()))

Solution (Python):
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

S = sr()
days = 'SUN,MON,TUE,WED,THU,FRI,SAT'.split(',')
day_to_x = {x: 7 - i for i, x in enumerate(days)}

print(day_to_x[S])

Solution (Python):
s = input()

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

for i in range(7):
	if d[i] == s:
		print(i+1)

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

print(7 - days.index(s))

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

Solution (Python):
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

S = sr()
day = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
day = day[::-1]
i = day.index(S)
print((i+1))

Solution (Python):
import sys

day = 'SUN, MON, TUE, WED, THU, FRI, SAT'.split(', ')
table = dict(zip(day, range(7, 0, -1)))

s = sys.stdin.readline().rstrip()

def main():
    print(table[s])

if __name__ ==  '__main__':
    main()

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

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

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

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

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

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

s = week.index(s)
print(7-s)

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

Solution (Python):
S = input()

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

print(7-week.index(S))

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

for i in range(7):
    if weekday[i] == S:
        break

print(7-i)

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

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

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()
print(7-l.index(S))

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

Solution (Python):
def main():
    day = input()
    days = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
    days_dict = {days[i]:7-i for i in range(len(days))}
    print(days_dict[day])

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

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

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

print(list.index(S))

Solution (Python):
li = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
s = input()
t = 0
for i in li:
  if i == s:
    break
  t += 1
print(7 - t)

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

Solution (Python):
d = list(reversed(['SUN','MON','TUE','WED','THU','FRI','SAT']))
print(d.index(input())+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):
T=['SUN','MON','TUE','WED','THU','FRI','SAT']

S=str(input())

for i in range(7):
    if T[i]==S:
        print(7-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)
else:
  print(1)

Solution (Python):

import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy



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

print(d[input()])

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

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

S = input()

ans = (0 - days.index(S)) % 7

if ans == 0:
    ans = 7
    
print(ans)

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

S=input()

print(7-DAYS.index(S))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 = 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):
A = ['SUN','MON','TUE','WED','THU','FRI','SAT']
S = input()
for i in range(7):
  if S == A[i]:
    print(7-i)

Solution (Python):
S = input()

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

i = 0
while i <= 6:
    if week_list[i] == S:
        print(i+1)
        break
    else:
        i = i+1

Solution (Python):

import sys


def solve(S: str):
    l = ['SUN','MON','TUE','WED','THU','FRI','SAT']
    print(7 - l.index(S))
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  
    solve(S)

if __name__ == '__main__':
    main()

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

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

Solution (Python):
dow = list(reversed(['SUN','MON','TUE','WED','THU','FRI','SAT']))
today = input()
for i in range(len(dow)):
  if today == dow[i]:
    print(i+1)
    quit()

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

a='SUN'
b='MON'
c='TUE'
d='WED'
e='THU'
f='FRI'
g='SAT'

if S==a:
    print(7)

elif S==b:
    print(6)

elif S==c:
    print(5)

elif S==d:
    print(4)

elif S==e:
    print(3)

elif S==f:
    print(2)

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

Solution (Python):
s = input()

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

i = l.index(s)

ans = 7 - i

print(ans)

Solution (Python):
S = input()

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

Solution (Python):
s = input()

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

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

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

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

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

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

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

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

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 = ['SU', 'MO', 'TU', 'WE', 'TH', 'FR', 'SA']
s = input()[:2]
print(7 - day.index(s))

Solution (Python):
s = input()

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

diff  = abs(day.index(s) - 7)

print(diff)

Solution (Python):
def main():
    W = ['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN']
    S = input()
    if S == 'SUN':
        print(7)
    else:
        print(7 - W.index(S) - 1)
    

main()

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

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

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

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

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

if S == 'SUN':
    print(7)
else:
    print(7 - week.index(S) - 1)

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

idx=y.index(s)

print(len(y)-idx)

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

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

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

print(dic[input()])

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

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

Solution (Python):









mod = 10**9 + 7



s = input()
l = ['SUN','MON','TUE','WED','THU','FRI','SAT']
if s == l[0]: print(7)
elif s == l[1]: print(6)
elif s == l[2]: print(5)
elif s == l[3]: print(4)
elif s == l[4]: print(3)
elif s ==l[5]: print(2)
elif s == l[6]: print(1)

Solution (Python):
s = input()
lis = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
print(7 - lis.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()
slist=["MON","TUE","WED","THU","FRI","SAT","SUN"]
a=7-(slist.index(s)+1)
if(a==0):
    print(7)
else:
    print(7-(slist.index(s)+1))

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

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

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

Solution (Python):
x = input()
if x == "SUN":
    print(7)
elif x == "MON":
    print(6)
elif x == "TUE":
    print(5)
elif x == "WED":
    print(4)
elif x == "THU":
    print(3)
elif x == "FRI":
    print(2)
elif x == "SAT":
    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()
lst = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
print(7-lst.index(s))

Solution (Python):


lst = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
S = input()

print(7 - lst.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):
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

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

S = input()
print(weekdays.index(S) + 1)

Solution (Python):

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

Solution (Python):

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

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

print(7 - S.index(s))

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

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

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

d = input()

print(7-w.index(d))

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

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

print(m.get(input()))

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

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

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

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

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

Solution (Python):
s=input()
ans={"SUN":7,"MON":6,"TUE":5,"WED":4,"THU":3,"FRI":2,"SAT":1}
print(ans[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):
s = str(input())

a = ['0','SAT','FRI','THU','WED','TUE','MON','SUN']
print(a.index(s))