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

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):
d = dict()
d["SUN"] = 7
d["MON"] = 6
d["TUE"] = 5
d["WED"] = 4
d["THU"] = 3
d["FRI"] = 2
d["SAT"] = 1
s = input()
print(d[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"]

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

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

a = 6 - int(week.index(day))
if a != 0:
    print(a)
else: print("7")

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

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

print(weeks[input_day])

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"]
print(7-l.index(s))

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

print(len(days) - days.index(S))

Solution (Python):
S = input()

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

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

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

str = input()
n = days.index(str)
print(7-n)

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

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

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

for i, x in enumerate(week):
    if x == 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)
elif S == 'SAT':
    print(1)

Solution (Python):
S = input()

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


for k in range(7):
  if a[k] == S:
    print(7 - k)

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

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

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

print(7-W.index(s))

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

Solution (Python):

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


print(7 - s.index(S))

Solution (Python):
s = input()
v=["SUN","MON","TUE","WED","THU","FRI","SAT"]
i=v.index(s)
x=int(i)
ans=7-x
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):
W = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
S = input()
i = W.index(S) + 1
ans = 1
while W[i % len(W)] != 'SUN':
    i += 1
    ans+=1
print(ans)

Solution (Python):
def main():
    S = input()

    dict = {
        'SUN': 7,
        'MON': 6,
        'TUE': 5,
        'WED': 4,
        'THU': 3,
        'FRI': 2,
        'SAT': 1,
    }
    print(dict[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):
a = input()
b = a.split()

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

cnt = 0
for i in days:
    if a == i:
        print(7-cnt)

    cnt += 1

Solution (Python):
s=input()

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

Solution (Python):
a=input()

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

Solution (Python):


 

s = str(input())
day = ['SUN','MON','TUE','WED','THU','FRI','SAT']
diff = [7,6,5,4,3,2,1]

print(diff[day.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):
S = input().rstrip()
print(7 - ["SUN","MON","TUE","WED","THU","FRI","SAT"].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()
sl = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
for i in range(len(sl)):
    if s == sl[i]:
        print(len(sl) - i)

Solution (Python):
s = input()
a = ''
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):
day = input()

list=["SUN","MON","TUE","WED","THU","FRI","SAT"]
answer = 7 - int(list.index(day))

print(answer)

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

Solution (Python):
s = input()

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

idx = day.index(s)
print(7-idx)

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

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

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

print(7 if days == 0 else days)

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



def solve(*args: str) -> str:
    day = {'SUN': 0, 'MON': 1, 'TUE': 2,
           'WED': 3, 'THU': 4, 'FRI': 5, 'SAT': 6}
    return str(7-day[args[0]])


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))

Solution (Python):

import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline
INF = 2**62-1

def read_int():
    return int(input())


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


def read_float():
    return float(input())


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


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(S):
    ans = 0
    D = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI','SAT']
    
    return 7 - D.index(S)


def main():
    S = read_str()
    print(slv(S))


if __name__ == '__main__':
    main()

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

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

Solution (Python):
s = 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
elif s == 'SAT':
  ans = 1

print(ans)

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

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

print(daylist[N])

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

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

Solution (Python):
S = input()

a = ('SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT')

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

print(7 - days.index(input()))

Solution (Python):
W = input()

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

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

Solution (Python):
s=input()
y={"SAT":1,"FRI":2,"THU":3,"WED":4,"TUE":5,"MON":6,"SUN":7}
print(y[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()
list=['SUN','MON','TUE','WED','THU','FRI','SAT']
print(7-list.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()
d = {'SUN':7,'MON':6,'TUE':5,'WED':4,'THU':3,'FRI':2,'SAT':1}
print(d[S])

Solution (Python):
A = input()
if A == 'SAT':
  print(1)
elif 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)

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

Solution (Python):



data = input()

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

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

Solution (Python):
S = 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
elif S == 'SAT':
    ans = 1

print(ans)

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

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

Solution (Python):
s=str(input())
ans=int(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
elif s=="SAT":
    ans=1

print(ans)

Solution (Python):
list = input()
l = ["SAT","FRI","THU","WED","TUE","MON","SUN"]
for i in range(0,7):
  if l[i] == list:
    print(i+1)

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

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


if __name__ == '__main__':
    solve()

Solution (Python):
a = input()

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

Solution (Python):
S = input()

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

print(WEEK['SUN'] - WEEK[S] + 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)
else:
  print(1)

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

S = input()

mode = 0
for i, day in enumerate(days * 2):
    if mode == 0:
        mode = 1 if S == day else 0
        i_today = i
    else:
        if day == 'SUN': break

if S == 'SUN':
    print(7)
else:
    print(i - i_today)

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"]
s = input()
for i in range(len(l)):
    if s == l[i]:
        print(7-i)

Solution (Python):
s = input()

m = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
for i in range(7):
  if m[7-(i+1)]==s:
    print(i+1)

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

Solution (Python):
S = str(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):
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)
elif S=='SAT':
  print(1)

Solution (Python):

S = str(input())
week_list = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
week_dir = {}

for idx, wday in enumerate(reversed(week_list)):
    week_dir[wday] = idx + 1

print(week_dir[S])

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

for i in range(7):
    if S==WEEK[i]:
        ans=i+1

print(ans)

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

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

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

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

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()
ss = ['SUN','MON','TUE','WED','THU','FRI','SAT']
sss = [7,6,5,4,3,2,1]
for i in range(7):
    if s == ss[i]:
        print(sss[i])

Solution (Python):
data = input()

if data == 'SUN':
    print(7)
elif data == 'MON':
    print(6)
elif data == 'TUE':
    print(5)
elif data == 'WED':
    print(4)
elif data == 'THU':
    print(3)
elif data == 'FRI':
    print(2)
elif data == '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):
def main():
    weekday_name = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
    s = input()
    for i in range(7):
        if weekday_name[i] == s:
            print(7 - i)

if __name__ == "__main__":
    main()

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

Solution (Python):
s = input()
d = 0

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

print(d)

Solution (Python):
s = input()
k = s[0]+s[1]
if (k == "SU"):
    print(7)
elif (k == "MO"):
    print(6)
elif (k == "TU"):
    print(5)
elif (k == "WE"):
    print(4)
elif (k == "TH"):
    print(3)
elif (k == "FR"):
    print(2)
else:
    print(1)

Solution (Python):

import sys


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



def main():
    S = str(input())
    solve(S)

if __name__ == '__main__':
    main()

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

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

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)
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):
from collections import defaultdict, deque, Counter
import sys
import bisect
import heapq
import math



sys.setrecursionlimit(1000000000)

MIN = -10 ** 9
MOD = 10 ** 9 + 7

ALPHA = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"


def main():
    
    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)

    


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

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

S = input()
for i, w in enumerate(week):
    if S == w:
        print(i+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 == "SUN":
    print(str(7))
elif s == "MON":
    print(str(6))
elif s == "TUE":
    print(str(5))
elif s == "WED":
    print(str(4))
elif s == "THU":
    print(str(3))
elif s == "FRI":
    print(str(2))
else:
    print(str(1))

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

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

def main():
    S_list = ['SUN','MON','TUE','WED','THU','FRI','SAT','']
    S_list.reverse()
    S = input().rstrip()

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

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

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

Solution (Python):
S = input()

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

for i in range(len(week)):
    if (S == 'SUN'):
        print(7)
        break
    elif (S == week[i]):
        print(6-i)

Solution (Python):
import math
import sys

S=input()

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

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

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

Solution (Python):


S = input()

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

print(dict[S])

Solution (Python):
N = input()

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

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

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

day = 7

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

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

cnt = 0

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

Solution (Python):
s = input()

if s == "SAT":
    print(1)
elif s == "SUN":
    print(7)
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()
a=0
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
else:
    a=1

print(a)

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

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

Solution (Python):
import unittest


class TestA(unittest.TestCase):
    def test_1(self):
        self.assertEqual(think('SAT'), 1)

    def test_2(self):
        self.assertEqual(think('SUN'), 7)


def solve():
    s = read()
    result = think(s)
    write(result)


def read():
    return read_line()


def read_int(n):
    return read_type(int, n)


def read_float(n):
    return read_type(float, n)


def read_type(t, n):
    return list(map(lambda x: t(x), read_line().split(' ')))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(data):
    weekday = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
    return len(weekday) - weekday.index(data)


def write(result):
    print(result)


if __name__ == '__main__':
    
    solve()

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

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

n = day.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)
else:
    print(1)

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

elif S =='MON':
  print(int(6))

elif S =='TUE':
  print(int(5))

elif S =='WED':
  print(int(4))

elif S =='THU':
  print(int(3))

elif S =='FRI':
  print(int(2))

elif S =='SAT':
  print(int(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()
d = {"SUN":7,"MON":6,"TUE":5,"WED":4,"THU":3,"FRI":2,"SAT":1}
print(d[s])

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