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):
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)
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):
import sys
from math import ceil, floor, sqrt, sin, cos, pi
from itertools import accumulate, permutations, combinations
from fractions import gcd 
from collections import deque, Counter
from operator import itemgetter
from heapq import heappop,heappush
sys.setrecursionlimit(10**7)
def lcm(x, y): return ((x * y) // gcd(x, y)) 


day = ['SUN', 'MON','TUE','WED','THU','FRI','SAT']
s = input()
for x in range(len(day)):
    if day[x] == s:
        print(7 - x)
        sys.exit()

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

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

today_day = input()
today_index = days.index(today_day)
nextsun_index = days.index('NEXT_SUN')
print(nextsun_index - today_index)

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

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


if __name__ == '__main__':
    q1()

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

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

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

S = input()

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




for i, d in enumerate(day):
    if d == S:
        print(7 - i)
        exit()

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

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

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

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


if __name__ == '__main__':
    main()

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

S = str(input())

for index, x in enumerate(lst):
    if x == S:
        print ((7 - index))
        break

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

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):
def resolve():
  s = input()
  ans = 1
  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)
  return

if __name__ == "__main__":
  resolve()

Solution (Python):
week = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT", "GOMI"]
d = {v: i for i, v in enumerate(week[::-1])}
print(d[input()])

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

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

S = readline().strip()
A = ('SUN','MON','TUE','WED','THU','FRI','SAT')
B = (7, 6, 5, 4, 3, 2, 1)
C = {a: b for a, b in zip(A, B)}
print(C[S])

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

Solution (Python):
S = str(input())
lst = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
lst.reverse()

for i in range(7):
    if S == lst[i]:
        print(i + 1)
        break

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

Solution (Python):
def solve():
    s = ['SUN','MON','TUE','WED','THU','FRI','SAT']
    s = s[::-1]
    a = input()
    for i in range(7):
        if s[i]==a:
            print(i+1)
if __name__=='__main__':
    solve()

Solution (Python):

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

def main():
    mod=10**9+7
    L=["SUN","MON","TUE","WED","THU","FRI","SAT"]
    S=input()
    ans=0
    for i in range(7):
        if S==L[i]:
            ans=7-i
            
    print(ans)

main()

Solution (Python):
S = input()

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

idx = DAY.index(S)

print(7 - idx)

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

W.reverse()

S = input()

print(W.index(S) + 1)

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

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

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


if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):


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

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

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

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

Solution (Python):


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

if __name__ == "__main__":
    main()

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

S = input()
s = list.index(S)

ans = 7 - s
print(ans)

Solution (Python):
print(7-'SUNMONTUEWEDTHUFRISAT'.index(input())//3)

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

Solution (Python):
s = input()
week_l = "SUN,MON,TUE,WED,THU,FRI,SAT".split(",")
n = week_l.index(s)
print(7-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):
x = input()
youbi = {
  'SUN': 7
  , 'MON': 6
  , 'TUE': 5
  , 'WED': 4
  , 'THU': 3
  , 'FRI': 2
  , 'SAT': 1
}
print(youbi[x])

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

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    

    
    

    s = input().rstrip()
    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)

if __name__ == '__main__':
    main()

Solution (Python):
S = input()

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

Solution (Python):

import math


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


s = input()


text = 7 - list_day.index(s)


print(text)

Solution (Python):
l=["MON","TUE","WED","THU","FRI","SAT","SUN"]
S=input()
if S=="SUN":
  print(7)
else:
  print(6-l.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 = 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
from bisect import bisect_right as bsr
from collections import Counter as cnt
from collections import defaultdict as dd
from collections import deque
from fractions import gcd
from itertools import permutations as perm
from math import ceil, factorial, floor
from operator import itemgetter as ig

sys.setrecursionlimit(1000000)


args = None
INF = float("inf")
MOD = int(1e9 + 7)


def input(*ps):
    if type(ps[0]) is list:
        return [input(*ps[0][:-1]) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]


def yesno(v, yes="Yes", no="No", upper=False):
    if upper:
        print([yes.upper(), no.upper()][not v])
    else:
        print([yes, no][not v])


def main():
    """エントリーポイント"""
    S = input(str)
    print({"SUN": 7, "MON": 6, "TUE": 5, "WED": 4, "THU": 3, "FRI": 2, "SAT": 1}[S])


if __name__ == '__main__':
    args = iter(sys.stdin.read().split())
    main()

Solution (Python):
s=input()

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

print(7-List.index(s))

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

Solution (Python):
day = input()
days = ["MON","TUE","WED","THU","FRI","SAT"]
if day in days:
  a = days.index(day)
  print(6-a)
else:
  print(7)

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

Solution (Python):
S = input()

ans_dic = {'SAT': 1, 'FRI': 2, 'THU': 3, 'WED': 4, 'TUE': 5, 'MON': 6, 'SUN': 7}
ans = ans_dic[S]

print(ans)

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

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

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

if day == "SUN":
    print(7)
else:
    ans = 6 - num
    print(ans)

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

Solution (Python):
s = input()

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

for i in range(len(week)):
    if s == week[i]:
        print(len(week)-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):
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 = input()
l = ["SAT","FRI","THU","WED","TUE","MON","SUN"]
if n in l:
    print(l.index(n)+1)

Solution (Python):
n = input()
if "SU" in n:
    print(7)
if "M" in n:
    print(6)
if "TU" in n:
    print(5)
if "W" in n:
    print(4)
if "TH" in n:
    print(3)
if "F" in n:
    print(2)
if "SA" in n:
    print(1)

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

Solution (Python):

li = ['SUN','MON','TUE','WED','THU','FRI','SAT']
x = input()
i = 0
while True:
    i += 1
    if li.pop() == x:
        break
        
print(i)

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

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

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

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

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

Solution (Python):
import numpy as np
S = input()
W = np.array(['SUN','MON','TUE','WED','THU','FRI','SAT'])
I = np.arange(7)
ans = 7 - I[W==S][0]
print(ans)

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

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

s = input()

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

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

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

print(7-days.index(s))

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

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

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

print(7-List.index(s))

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

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

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

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

for i in range(len(list)):
    if day == list[i]:
        print(7 - i)

Solution (Python):
class CantWaitForHoliday:
    def __init__(self):
        self.W =['MON','TUE','WED','THU','FRI','SAT','SUN']
    
    def calculate(self, S):
        if S == 'SUN':
            return 7
        n = self.W.index(S)
        return 6 - n
if __name__ == '__main__':
    S = input()
    CW = CantWaitForHoliday()
    result = CW.calculate(S)
    print(str(result))

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

Solution (Python):
import math
import fractions
import sys
import itertools
import numpy as np

def input1():
	return int(input())


def input2():
	return map(int,input().split())


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


S=str(input())
date=["SUN","MON","TUE","WED","THU","FRI","SAT"]

for i in range(len(date)):
	if date[i]==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):
Day=["SUN","MON","TUE","WED","THU","FRI","SAT"]
n=input()
for i in range(7):
  if n==Day[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):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

S = input()
SS = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
cnt= [7, 6, 5, 4, 3, 2, 1]
c = -1
for n in SS:
  c += 1
  if S == n:
    print(cnt[c])
    exit()

Solution (Python):
S=input()
day=["SUN","MON","TUE","WED","THU","FRI","SAT"]
ans=0
flag=0
a=0
while flag!=1:
    if S==day[a]:
        ans=7-a
        flag=1
    else:
        a+=1
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):
S=str(input())
Y=['SUN','MON','TUE','WED','THU','FRI','SAT']

print(7-Y.index(S))

Solution (Python):
s = input()

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

day = week.index(s)

print(7-day)

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

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

Solution (Python):

import sys
import numpy as np


def solve(S: str):
    w = {'SUN':7, 'MON':6, 'TUE':5, 'WED':4, 'THU':3, 'FRI':2, 'SAT':1}
    print(w[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):
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()
dic = {'SUN':7, 'MON':6, 'TUE':5, 'WED':4, 'THU':3, 'FRI':2, 'SAT':1}
print(dic[s])

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

s=str(input())

print(d[s])

Solution (Python):
S = input()

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

print(d[S])

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

s = input()
print(count(s))

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

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

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

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

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

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

Solution (Python):
S = input()

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

for i in range(len(days)):
  if S == days[i]:
    break

print(7 - i)

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

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","MON","TUE","WED","THU","FRI","SAT"]
ind = 0
for i in range(len(days)):
    if S == days[i]:
        ind = i
        break
print(7-ind)

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

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

Solution (Python):


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

S = input()
number = int(day.index(S))

minus = 7 - number
print(minus)

Solution (Python):


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

S = input()
number = int(day.index(S))

minus = 7 - number
print(minus)

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

r=7-l.index(S)
print(r)

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

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

Solution (Python):
import sys

def input():
    return sys.stdin.readline().rstrip('\n')


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

S = input()


print(DAYS[S])

Solution (Python):
import sys
input=sys.stdin.readline
s=input().rstrip()
l=['SUN','MON','TUE','WED','THU','FRI','SAT']
for i in range(7):
    if s==l[i]:
        print(7-i)

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

Solution (Python):
week = ['SUN','MON','TUE','WED','THU','FRI','SAT','SUN']
s = input()
countflg = False
day = 0
for w in week:
  if countflg == True and w == 'SUN':
    print(day)
    exit()
  if s == w:
    countflg = True
  if countflg == True:
    day += 1

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

Solution (Python):
s = input()

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

print(d.index(s))

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

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

Solution (Python):
import sys
import os
import time

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

MOD = 10 ** 9 + 7


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    S = iss()
    key = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
    time.sleep(1.98)
    print(7 - key.index(S))


if __name__ == '__main__':
    main()

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

Solution (Python):
import sys
import os

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

MOD = 10 ** 9 + 7


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

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


if __name__ == '__main__':
    main()

Solution (Python):
S = input()

days = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
diffs = range(1, 8)[::-1]
next_sunday = {d: i for d, i in zip(days, diffs)}
print(next_sunday[S])

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

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

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

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

s = input()

print(d[s])

Solution (Python):
import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)


def get_nums_l():
    return [ int(s) for s in input().split(" ")]


def get_nums_n(n):
    return [ int(input()) for _ in range(n)]


def get_all_int():
    return map(int, open(0).read().split())

def log(*args):
    print("DEBUG:", *args, file=sys.stderr)

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

s = input()

print((7 - dates.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()
x = [ '0', 'SAT', 'FRI', 'THU', 'WED', 'TUE', 'MON', 'SUN']
for i in range(len(x)):
     if s == x[i]:
          print(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)
else:
  raise ValueError

Solution (Python):
S = input()

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

if S == A[0]:
    ans = 7
elif S == A[1]:
    ans = 6
elif S == A[2]:
    ans = 5
elif S == A[3]:
    ans = 4
elif S == A[4]:
    ans = 3
elif S == A[5]:
    ans = 2
elif S == A[6]:
    ans = 1

print(ans)

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

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

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

print(7-s)

Solution (Python):
s = input()

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

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

Solution (Python):
S = input()

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

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