a = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'] x = (2 + int(input())) % 7 print(a[x])