Problem:
 Score : 100 points    Problem Statement Dolphin loves programming contests. Today, he will take part in a contest in AtCoder. In this country, 24-hour clock is used. For example, 9:00 p.m. is referred to as " 21 o'clock". The current time is A o'clock, and a contest will begin in exactly B hours.
When will the contest begin? Answer in 24-hour time.      Constraints  0 \leq A,B \leq 23  A and B are integers.         Input The input is given from Standard Input in the following format:  A  B       Output Print the hour of the starting time of the contest in 24-hour time.        Sample Input 1 9 12      Sample Output 1 21  In this input, the current time is 9 o'clock, and 12 hours later it will be 21 o'clock in 24-hour time.       Sample Input 2 19 0      Sample Output 2 19  The contest has just started.       Sample Input 3 23 2      Sample Output 3 1  The contest will begin at 1 o'clock the next day.

Solution (Python):
print(eval(input().replace(" ","+"))%24)

Solution (Python):
a,b=map(int,input().split())

print((a+b)%24)

Solution (Python):
a,b = map(int,input().split())
print((a+b)%24)

Solution (Python):
a,b=map(int,input().split())
n=a+b
if n < 24:
    print(n)
else:
    print(int(n-24))

Solution (Python):
print((lambda a : (a[0]+a[1])%24)(list(map(int,input().split())) ))

Solution (Python):
def main():
    A, B = map(int, input().split())
    if A + B >= 24:
        print(A + B - 24)
    else:
        print(A + B)


main()

Solution (Python):
num = input().split()

tmp = int(num[0])+int(num[1])
print(tmp) if tmp<24 else print(tmp-24)

Solution (Python):
a, b = [int(x) for x in input().split()]
print((a+b)%24)

Solution (Python):
A,B=[int(x) for x in input().split()]
print((A+B)%24)

Solution (Python):
a,b = map(int,input().split())
print((a+b)%24)

Solution (Python):
a, b = map(int, input().split())

ans = a + b

if ans>23:
    print(ans-24)
else:
    print(ans)

Solution (Python):
x,y = map(int,input().split())
if x+y >23:
  print(x+y-24)
else:
  print(x+y)

Solution (Python):
a, b = map(int, input().split())

print((a+b)%24)

Solution (Python):
a, b = map(int, input().split())
print((a + b) % 24)

Solution (Python):
a,b = map(int,input().split())
starttime = a+b
if starttime >= 24:
  starttime-= 24
print(starttime)

Solution (Python):
A, B = map(int, input().split())

print((A+B)%24)

Solution (Python):
a,b = map(int,input().split())
if a + b >= 24:
    print(a+b - 24)
else:
    print(a + b)

Solution (Python):




a,b = list(map(int,input().split(" ")))



print((a+b)%24)

Solution (Python):
a,b=map(int,input().split())
print((a+b)%24)

Solution (Python):
a, b = map(int, input().split())
print((a + b) % 24)

Solution (Python):
a, b = map(int, input().split())
time = a + b
if time < 24:
  print(time)
else:
  print(time - 24)

Solution (Python):
a, b = map(int, input().split())
if a + b < 24:
  print(a + b)
else:
  print((a + b) - 24)

Solution (Python):
a,b = map(int,input().split())

if a+b < 24:
    print(a+b)
else:
    print(a+b-24)

Solution (Python):
A,B = map(int,input().split())

if A+B < 24:
  print(A+B)
else:
  print(A+B-24)

Solution (Python):
A,B=map(int,input().split())
print((A+B)%24)

Solution (Python):
A,B=map(int,input().split())
print((A+B)%24)

Solution (Python):
A, B = map(int, input().split())
print((A+B)%24)

Solution (Python):
a,b = map(int, input().split())
c = round((a+b)%24)
print(c)

Solution (Python):
A,B = list(map(int,input().split()))
print((A+B)%24)

Solution (Python):
a,b=map(int,input().split())
if a+b>=24:
  print(int(a+b-24))
else:
  print(int(a+b))

Solution (Python):
a, b = map(int, input().split())
print((a+b)%24)

Solution (Python):
a,b=map(int,input().split())
if a+b < 24:print(a+b)
else:print(a+b-24)

Solution (Python):
a, b = map(int, input().split())
print((a+b) % 24)

Solution (Python):
A,B=map(int,input().split())

if A+B < 24:
  print(A+B)
else:
  print(A+B-24)

Solution (Python):

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

def main():
    a, b = map(int, input().split())
    ans = a + b
    if ans >= 24:
        ans -= 24
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
a, b = map(int, input().split())
ans = a + b
if ans >= 24:
  ans = ans - 24
print(ans)

Solution (Python):
a,b = map(int,input().split())
if a + b >= 24:
  print(a+b-24)
else:
  print(a+b)

Solution (Python):
A, B = map(int, input().split())

print((A + B) % 24)

Solution (Python):
A,B = map(int,input().split())

print((A+B)%24)

Solution (Python):
A,B = map(int,input().split())

if A + B < 24:
    print(A + B)
else:
    print(A+B-24)

Solution (Python):
a,b = map(int, input().split())

if a+b < 24:
    print(a+b)
if a+b >= 24:
    print(a+b-24)

Solution (Python):
def main():
    a,b=map(int,input().split(' '))
    print((a+b)%24)

if __name__ == '__main__':
    main()

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

A, B = MAP()
if A + B < 24:
    print(A + B)
else:
    print(A + B - 24)

Solution (Python):
a,b=map(int,input().split());print((a+b)%24)

Solution (Python):
a,b = map(int,input().split())
print((a+b)%24)

Solution (Python):
a,b=map(int,input().split())
print((a+b)%24)

Solution (Python):
a=list(map(int,input().split()))
print((a[0]+a[1])%24)

Solution (Python):
a, b = map(int, input().split())
print((a + b) % 24)

Solution (Python):
a,b=map(int,input().split())
hora=a
i=1
if b==0:
  print(a)
else:
    
  while True:
    b-=1
    hora+=i
    if hora==24:
      hora=0
    if b==0:
      print(hora)
      break

Solution (Python):
A,B = map(int,input().split())
if A+B>=24:
    print(A+B-24)
else:
    print(A+B)

Solution (Python):
a,b=map(int,input().split())
print((a+b)%24)

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def A():
    a, b = LI()
    print((a+b)%24)
    return


def B():
    return


def C():
    return


def D():
    return


def E():
    return


def F():
    return


def G():
    return


def H():
    return


if __name__ == '__main__':
    A()

Solution (Python):



A, B = map(int, input().split())


print((A + B) % 24)

Solution (Python):
a, b = map(int, input().split())
print((a + b) % 24)

Solution (Python):
A,B = map(int,input().split())
print((A+B)%24)

Solution (Python):



a,b = map(int,input().split())

if a+b >= 24:
    print(a+b-24)
else:
    print(a+b)

Solution (Python):

A,B = map(int,input().split())

print ((A+B) % 24 )

Solution (Python):
a, b = map(int, input().split())
if a + b < 24:
  print(a + b)
else:
  print(a + b - 24)

Solution (Python):
a,b=map(int,input().split())
print((a+b)%24)

Solution (Python):
a,b = map(int,input().split())
print(a+b if a+b<24 else a+b-24)

Solution (Python):
A,B = map(int,input().split())
print((A+B)%24)

Solution (Python):
A, B = map(int,input().split())

ans = (A + B) % 24
print(ans)

Solution (Python):
a, b = (int(x) for x in input().split())
if a + b >= 24:
  print(a + b - 24)
else:
  print(a + b)

Solution (Python):
A, B = map(int, input().split())

if A + B >= 24:
    print(A + B - 24)
else:
    print(A + B)

Solution (Python):
a, b = map(int, input().split())

print((a + b) % 24)

Solution (Python):
a,b=map(int,input().split())
print((a+b)%24)

Solution (Python):
a,b=map(int,input().split())
if a+b < 24:print(a+b)
else:print(a+b-24)

Solution (Python):

import sys
sys.setrecursionlimit(300000)


def solve(A: int, B: int):
    ret = (A + B) % 24
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    solve(A, B)

if __name__ == '__main__':
    main()

Solution (Python):
a, b = map(int, input().split())
x = a+b
if x<=23:
    print(x)
else:
    print(x-24)

Solution (Python):
a, b = map(int, input().split())
if a+b >= 24:
	print(a+b-24)
else:
	print(a+b)

Solution (Python):
A, B = map(int, input().split())
print((A + B) % 24)

Solution (Python):
def main():
	A, B = map(int, input().split())
	ans = (A+B)%24
	print(ans)


if __name__ == '__main__':
	main()

Solution (Python):
A, B = map(int, input().split())
print((A + B) % 24)

Solution (Python):
A, B = map(int, input().split())
ans = A+B
if ans>=24:
  ans -= 24
print(ans)

Solution (Python):
x,y=map(int,input().split())
print((x+y)%24)

Solution (Python):
A,B = map(int,input().split())
print((A+B)-24 if A+B>23 else A+B)

Solution (Python):
A, B = map(int, input().split())

print((A+B) % 24)

Solution (Python):
a, b = map(int, input().split())

start = a + b

if start > 23:
  start -= 24

print(start)

Solution (Python):
a,b = map(int,input().split())
print((a+b)%24)

Solution (Python):
a,b = map(int,input().split())
print((a+b)%24)

Solution (Python):
a = list(map(int,input().split()))
b = a[0]+a[1]

if b >= 24:
  print(b-24)
else:
  print(b)

Solution (Python):
a, b = map(int, input().split())

print((a + b) % 24)

Solution (Python):
A,B = map(int,input().split())
if (A+B)>23:
  print((A+B)-24)
else:
  print(A+B)

Solution (Python):
A,B=map(int,input().split())
print((A+B)%24)

Solution (Python):
a,b = map(int,input().split())
print((a+b)%24)

Solution (Python):
A,B=map(int,input().split())
print((A+B)%24)

Solution (Python):
a, b = map(int, input().split())

print((a+b) % 24)

Solution (Python):
a,b=map(int, input().split())
print((a+b)%24)

Solution (Python):
a,b=map(int,input().split())
print(a+b if a+b<24 else a+b-24)

Solution (Python):
A,B = map(int, input().split())
print((A + B)%24)

Solution (Python):
print(sum(map(int, input().split())) % 24)

Solution (Python):

A, B = map(int, input().split())
if A+B > 23:
    print(A+B-24)
else:
    print(A+B)

Solution (Python):
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

A, B = nl()
print((A + B) % 24)

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

a, b = map(int, input().split())
if a+b >= 24:
    ans = (a+b)-24
else:
    ans = a+b
print(ans)

Solution (Python):
a, b = map(int, input().split())

if a + b < 24:
    print(a + b)
    
elif a + b == 24:
    print(0)
else:
    print(a + b - 24)

Solution (Python):
a, b = map(int, input().split())
if a + b < 24:
    print(a + b)
else:
    print(a + b - 24)

Solution (Python):
A, B = map(int, input().split())
print((A+B)%24)

Solution (Python):
a, b = map(int, input().split())
print((a+b)%24)

Solution (Python):
a, b = map(int, input().split())
print((a + b) % 24)

Solution (Python):
a, b = map(int, input().split())
if a + b >= 24:
    print(a + b - 24)
else:
    print(a + b)

Solution (Python):
A,B=map(int,input().split())
if A+B>=24:
  print(A+B-24)
else:
  print(A+B)

Solution (Python):
A, B = list(map(int,input().split(' ')))


C=A+B
if C <= 23:
  print(C)
elif C >=24:
  print(C-24)

Solution (Python):
A,B = map(int,input().split())
print((A+B)%24)

Solution (Python):
a, b = map(int, input().split())
if a + b <= 23 :
	print(a + b)
else :
	print(a + b - 24)

Solution (Python):
a,b=map(int,input().split())
if a+b>23:
 print(a+b-24)
else:
 print(a+b)

Solution (Python):
A, B = list(map(int, input().split()))
print((A + B) % 24)

Solution (Python):



A, B = map(int, input().split())





print((A + B) % 24)

Solution (Python):
A,B=map(int,input().split())
print((A+B)%24)

Solution (Python):
a, b = map(int, input().split())

if a + b >= 24:
  print(a + b - 24)
else:
  print(a + b)

Solution (Python):
A, B = [int(i) for i in input().split()]
print((A + B) % 24)

Solution (Python):
def abc():
    a, b = map(int, input().split())
    t = a + b
    if t >= 24:
        t -= 24
    print(t)


abc()

Solution (Python):
A, B = tuple(map(int, input().split()))
print((A+B)%24)

Solution (Python):
a,b=map(int,input().split())
if a+b < 24:print(a+b)
else : print(abs(24-a-b))

Solution (Python):
A, B = map(int, input().split())
print((A + B) % 24)

Solution (Python):
A, B = map(int, input().split())
print((A+B)%24)

Solution (Python):
s = list(map(int, input().split()))
print((s[0] + s[1])%24)

Solution (Python):
a,b=map(int,input().split())

if a+b>=24:
  print(a+b-24)
else:
  print(a+b)

Solution (Python):
a, b = map(int, input().split())
print((a+b)%24)

Solution (Python):
a, b = map(int, input().split())
print((a+b)%24)

Solution (Python):
x, y = map(int, input().split())
if x + y < 24:
    print(x + y)
else:
    print(x + y - 24)

Solution (Python):


a, b = map(int,input().split())

print((a+b)%24)

Solution (Python):
a,b = list(map(int,input().split(" ")))
print((a+b)%24)

Solution (Python):
a,b = map(int, input().split())
if a + b < 24:
    print(a + b)
else:
    print(a + b - 24)

Solution (Python):
A, B = [int(x) for x in input().split()]
print((A+B)%24)

Solution (Python):
a,b=map(int,input().split())
if a+b>=24:
  print(a+b-24)
else:
  print(a+b)

Solution (Python):
a,b = map(int,input().split())

if a+b<24:
    print(a+b)
else:
    print(a+b-24)

Solution (Python):
A, B = map(int, input().split())

print((A+B) % 24)

Solution (Python):
A, B = map(int, input().split())
print((A + B) % 24)

Solution (Python):
A, B = map(int, input().split(' '))

print((A + B) % 24)

Solution (Python):
a,b=map(int,input().split())
if a+b>=24:
  print(a+b-24)
else:
  print(a+b)

Solution (Python):
a,b=map(int,input().split())
print((a+b)%24)

Solution (Python):
a,b = map(int, input().split())
ans = a+b

if a+b >=24 :
    ans -= 24

print(ans)

Solution (Python):
a, b = [ int(v) for v in input().split() ]
print((a+b)%24)

Solution (Python):
a, b = list(map(int, input().split()))
print((a+b)%24)

Solution (Python):

import sys
def input(): return sys.stdin.readline().rstrip()
def mi(): return map(int, input().split())


A, B = mi()

print(A+B if A+B<=23 else A+B-24)

Solution (Python):
a,b = map(int,input().split())

print((a+b)%24)

Solution (Python):
A, B = map(int, input().split())

ans = 0
if A + B < 24 :
    ans = A + B
elif A + B >= 24 :
    ans = (A + B) - 24

print(ans)

Solution (Python):
a, b = map(int, input().split())
if a + b <= 23:
  print(a + b)
else:
  print(a + b - 24)

Solution (Python):
A,B = map(int,input().split(' '))
if A + B <= 23:
  print(A + B)
else:
  print(A + B -24)

Solution (Python):
import sys
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return input()

def main():
    A, B = LI()
    ans = (A + B) % 24
    return ans

print(main())

Solution (Python):
a, b = map(int, raw_input().split())
c = a + b
if c >= 24:
    c = c - 24
print c

Solution (Python):
a,b = map(int, input().split())
print((a+b)%24)

Solution (Python):
print(sum(map(int,input().split()))%24)

Solution (Python):
a,b = map(int,input().split())
print(a+b if a+b <24 else a+b-24)

Solution (Python):
A, B = map(int,input().split())
print((A+B)%24)

Solution (Python):


a, b = map(int, input().split())


print(int((a+b)%24))

Solution (Python):
a,b=map(int,input().split())
print((a+b)%24)

Solution (Python):
a,b=map(int,input().split())
print((a+b)%24)

Solution (Python):
A,B = map(int,input().split())
if A + B >= 24:
    print(A + B - 24)
else:
    print(A + B)

Solution (Python):
a,b=map(int,input().split())

if a+b==24:
    print(0)
elif a+b<24:
    print(a+b)
    
else:
    print(a+b-24)

Solution (Python):
a, b = map(int, input().split())
print((a + b) % 24)

Solution (Python):
a,b = map(int, input().split())
print(int((a+b)%24))

Solution (Python):




a, b = map(int, input().split())


if a + b > 23:
  ans = a + b - 24
else:
  ans = a + b


print(ans)

Solution (Python):
a, b = input().split()
a, b = int(a), int(b)
print((a+b)%24)

Solution (Python):
A, B = map(int, input().split())
print((A + B) % 24)

Solution (Python):
a,b=map(int,input().split())

answer=a+b

if answer>=24:
	answer=answer-24

print(answer)

Solution (Python):
a,b=map(int,input().split())
print((a+b)%24)

Solution (Python):
print(int(eval(input().replace(' ','+')))%24)

Solution (Python):
print(sum(map(int,input().split()))%24)

Solution (Python):
A, B = map(int, input().split())
print((A + B) % 24)

Solution (Python):
A, B = map(int, input().split())

ans = A + B if (A+B) < 24 else A + B - 24
print(ans)

Solution (Python):
a,b=map(int,input().split())
print((a+b)%24)

Solution (Python):
a, b = map(int, input().split())
t = a + b
print(t if t < 24 else t - 24)

Solution (Python):
A,B=map(int,input().split())
print((A+B)%24)

Solution (Python):
a,b = map(int,input().split())
if a + b < 24:
    print(a+b)
elif a + b == 24:
    print(0)
else:
    print(a+b-24)

Solution (Python):
b, c = map(int, input().split())
print((b+c)%24)

Solution (Python):
A, B = map(int, input().split())

print((A+B)%24)

Solution (Python):
a, b = map(int, input().split())
if (a+b) < 24:
  print(a+b)
else:
  print(a+b-24)

Solution (Python):
print(sum(map(int,input().split()))%24)

Solution (Python):
print(eval(input().replace(" ","+"))%24)

Solution (Python):
A,B = map(int,input().split())
print((A+B)%24)

Solution (Python):
a, b = map(int, input().split())
ans = a + b

if ans < 24:
    print(ans)
else:
    print(ans - 24)

Solution (Python):
a,b=map(int, input().split())
print((a+b)%24)

Solution (Python):
a, b = map(int, input().split())

s = a + b
if s < 24:
    print(s)
else:
    print(s - 24)

Solution (Python):
a, b = map(int, input().split())
print((a+b) % 24)

Solution (Python):
[A,B]=list(map(int,input().split()))
print((A+B)%24)

Solution (Python):
A,B = map(int,input().split(" "))
print((A+B)%24)

Solution (Python):
A, B = map(int, input().split())
if (A + B) >= 24:
    print((A + B) - 24)
else:
    print(A+B)

Solution (Python):
a, b =[int(i) for i in input().split()]
print((a+b)%24)

Solution (Python):
a,b = map(int,input().split())
a += b
if a>=24:
    print(a-24)
else:
    print(a)

Solution (Python):
A,B=map(int,input().split())
print((A+B)%24)

Solution (Python):
A, B = map(int, input().split())

print((A+B)%24)

Solution (Python):
a,b=map(int,input().split());print((a+b)%24)

Solution (Python):
a,b = map(int,input().split())
print((a+b)%24)

Solution (Python):
A, B = map(int, input().split())
print((A + B) % 24)

Solution (Python):
a,b = map(int,input().split())
if a+b < 24:
    print(a+b)
else:
    print(a+b-24)

Solution (Python):
A, B = map(int, input().split())
print((A+B)%24)

Solution (Python):
A, B = map(int, input().split())
print((A+B)%24)

Solution (Python):
a,b = map(int,input().rstrip().split(' '))

if a+b < 24:
    print(a+b)
else:
    print(a+b-24)

Solution (Python):
a,b=map(int,input().split())

m=a+b

if m>=24:
  print(int(m-24))
else:
  print(int(m))

Solution (Python):
A,B=map(int,input().split())
print((A+B)%24)

Solution (Python):
print(sum(list(map(int, input().split())))%24)

Solution (Python):
a, b = map(int, input().split())
print((a + b) % 24)

Solution (Python):
a,b=map(int,input().split())
print((a+b)%24)

Solution (Python):
a, b = [int(n) for n in input().split()]
h = a + b

if h >= 24:
    print(h - 24)
else:
    print(h)

Solution (Python):
a = list(map(int,input().split()))
print((a[0] + a[1]) % 24)

Solution (Python):


def read_input():
    a, b = map(int, input().split())
    return a, b


def submit():
    a, b = read_input()

    c = a + b
    print(c % 24)

if __name__ == '__main__':
    submit()

Solution (Python):
A,B = map(int,input().split())
print((A+B)%24)

Solution (Python):
a,b=map(int,input().split())
if a+b<24:
  print(a+b)
else:
  print(a+b-24)

Solution (Python):
a,b = map(int,input().split())
ans = (a+b)%24
print(ans)

Solution (Python):
a, b = map(int, input().split())
print((a + b) % 24)

Solution (Python):
a, b = [int(i) for i in input().split(" ")]
print((a+b)% 24)

Solution (Python):
a, b = map (int, input().split())
print((a + b) % 24)

Solution (Python):
a, b = map (int, input().split())

if(a + b >= 24):
    print((a + b) % 24)
else:
    print(a + b)

Solution (Python):
import sys
a,b = list(map(int, input().split()))
print((a+b)%24)

Solution (Python):
A, B = map(int, input().split())
print((A+B) % 24)

Solution (Python):
a,b=map(int,input().split())
print((a+b)%24)

Solution (Python):
a,b = map(int,input().split())
if a+b>=24:
  print(a+b-24)
else:
  print(a+b)

Solution (Python):
a,b = map(int,input().split())
print(a+b if a+b < 24 else (a+b)-24)

Solution (Python):
A,B = [int(i) for i in input().split()]
if 0 <= A <= 23 and 0 <= B <= 23:
    if A + B >= 24:
        print( A + B - 24 )
    else:
        print( A + B )

Solution (Python):
A,B = [int(i) for i in input().split()]
if 0 <= A <= 23 and 0 <= B <= 23:
    if A + B >= 24:
        print( A + B - 24 )
    else:
        print( A + B )

Solution (Python):
A, B = map(int, input().split())

print([(A + B) - 24, A + B] [A + B < 24])

Solution (Python):
A, B = map(int, input().split())
time = A + B
print(time % 24)

Solution (Python):
A, B = map(int, input().split())

ans = (A+B) % 24

print(ans)

Solution (Python):
a,b=map(int,input().split())
print((a+b)%24)

Solution (Python):


a, b = map(int, input().split())

if a + b >= 24:
    print(a + b - 24)
else:
    print(a + b)

Solution (Python):
A, B = map(int, input().split())
now = A + B
if now < 24:
    print(now)
else:
    print(now - 24)

Solution (Python):
a,b=map(int,input().split())
print((a+b)%24)

Solution (Python):
[a,b]=list(map(int,input().split()))
print((a+b)%24)

Solution (Python):
a, b = map(int, input().split())
print(a+b if a+b <24 else a+b-24)

Solution (Python):
A,B=map(int,input().split())
print((A+B)%24)

Solution (Python):



x,y = map(int,input().split())

print((x+y)%24)

Solution (Python):
a,b=map(int,input().split())
print((a+b)%24)

Solution (Python):
A, B = map(int, input().split())
if A + B >= 24:
    ans = (A + B) - 24
else:
    ans = A + B
print(ans)

Solution (Python):

a, b = list(map(int, input().rstrip().split()))
print((a + b) % 24)

Solution (Python):
import functools

import os

INF = float('inf')


def inp():
    return int(input())


def inpf():
    return float(input())


def inps():
    return input()


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


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


def inls():
    return input().split()


def inpm(line):
    return [inp() for _ in range(line)]


def inpfm(line):
    return [inpf() for _ in range(line)]


def inpsm(line):
    return [inps() for _ in range(line)]


def inlm(line):
    return [inl() for _ in range(line)]


def inlfm(line):
    return [inlf() for _ in range(line)]


def inlsm(line):
    return [inls() for _ in range(line)]


def debug(fn):
    if not os.getenv('LOCAL'):
        return fn

    @functools.wraps(fn)
    def wrapper(*args, **kwargs):
        print('DEBUG: {}({}) -> '.format(
            fn.__name__,
            ', '.join(
                list(map(str, args)) +
                ['{}={}'.format(k, str(v)) for k, v in kwargs.items()]
            )
        ), end='')
        ret = fn(*args, **kwargs)
        print(ret)
        return ret

    return wrapper


a, b = inl()
print((a + b) % 24)

Solution (Python):
a,b = map(int,input().split())
t = a + b
if t >= 24:
    print(t - 24)
else:
    print(t)

Solution (Python):
A,B = map(int,input().split())
print((A+B) % 24)

Solution (Python):
a,b=map(int,input().split())
print((a+b)%24)

Solution (Python):
a,b=map(int, input().split())

if a+b>=24:
    print(a+b-24)
else:
    print(a+b)

Solution (Python):
a,b=map(int,input().split())
print(a+b if a+b<24 else a+b-24)

Solution (Python):
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    a, b = f()
    print((a+b)%24)

solve()

Solution (Python):
a,b = map(int,input().split())

t = 0
if a + b == 24:
  t = 0
elif a + b < 24:
  t = a + b
else:
  t = a + b - 24

print(t)

Solution (Python):
a = list(map(int, input().split()))

sum = a[0] + a[1]
if(sum < 24):
    print(sum)
else:
    print(sum - 24)

Solution (Python):
A,B = map(int,input().split())
print((A+B)%24)

Solution (Python):
a,b = map(int,input().split())
print((a+b)%24)

Solution (Python):
a, b = [int(item) for item in input().split()]
print((a+b)%24)

Solution (Python):
n,m=map(int,input().split())
print((n+m)%24)

Solution (Python):
a, b = map(int, input().split())
num = a + b
if num < 24:
  print(num)
else:
  print(num-24)

Solution (Python):
A, B = map(int, input().split())
print((A + B) % 24)

Solution (Python):
a,b = map(int,input().split())
if a+b<24:
  print(a+b)
else:
  print(a+b-24)

Solution (Python):
a,b = map(int, input().split())
if a+b>24:
    print(a+b-24)
elif a+b<24:
    print(a+b)
elif a+b==24:
    print(0)

Solution (Python):
a, b = map(int, input().split())
print(int((a + b) % 24))

Solution (Python):
a,b = map(int, input().split())
if a+b >= 24:
    print(a+b-24)
else:
    print(a+b)

Solution (Python):
a,b = map(int, input().split())

if a + b < 24:
  print(a+b)
else:
  print(a+b-24)

Solution (Python):
n,m=map(int,input().split())
print((n+m)%24)

Solution (Python):
A,B = map(int,input().split())
K = (A+B)%24
print(K)

Solution (Python):
from functools import reduce
import math

def main():
    
    
    
    
    
    
    
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    
    
    
    
    a, b = (int(_) for _ in input().split())  
    print((a+b)%24)
    
if __name__ == '__main__':
    main()

Solution (Python):
A, B = map(int, input().split())

if A+B >= 24:
  print(A+B-24)
else:
  print(A+B)

Solution (Python):
A, B = map(int, input().split())
print(A+B if A+B < 24 else A+B-24)

Solution (Python):
A,B = map(int, input().split())
x = A+B
if x >= 24:
  print(x-24)
else:
  print(x)

Solution (Python):
import sys

def main():
    input = sys.stdin.readline
    A, B = map(int, input().split())

    return (A + B) % 24


if __name__ == '__main__':
    print(main())

Solution (Python):
a,b=map(int,input().split())
print((a+b)%24)

Solution (Python):
print(eval('('+input().replace(' ','+')+')%24'))

Solution (Python):
a,b=map(int,input().split())
print((a+b)%24)

Solution (Python):
a, b = map(int, input().split())
print((a + b) % 24)

Solution (Python):
A, B = map(int, input().split())
print((A+B)%24)

Solution (Python):
a, b = map(int, input().split())
print((a + b) % 24)

Solution (Python):


a,b =map(int,input().split())

c = a+b
if c<=23:
    print(c)
else:
    print(c-24)

Solution (Python):
a, b=map(int,input().split())
print((a+b)%24)

Solution (Python):
A, B = map(int, input().split())

print((A+B)%24)

Solution (Python):
a,b=map(int,input().split())
print((a+b)%24)

Solution (Python):
A, B = map(int, input().split())
print((A + B) % 24)

Solution (Python):
a, b = map(int, input().split())
if a + b >= 24:
  print((a + b) % 24)
else:
  print(a + b)

Solution (Python):
a, b = map(int, input().split())

print((a+b)%24)

Solution (Python):
A, B = map(int, input().split())
 
if A+B>=24:
    print(A+B-24)
else:
    print(A+B)

Solution (Python):
A, B = map(int, input().split())
print((A + B) % 24)

Solution (Python):
A,B=map(int,input().split())
print((A+B)%24)

Solution (Python):
print(eval(input().replace(' ','+'))%24)

Solution (Python):
a, b = map(int, input().split())
ans = (a + b) % 24
print(ans)

Solution (Python):
def INSTR():
	return input()

def INNUM():
	return int(INSTR())

def INSTR_S():
	return INSTR().split()

def INNUM_S():
	return map(int, INSTR_S())

def INSTR_SM(n):
	return [tuple(INSTR_S()) for _ in range(n)]

def INNUM_SM(n):
	return [tuple(INNUM_S()) for _ in range(n)]

A, B = INNUM_S()
print((A + B) % 24)

Solution (Python):


a,b = map(int,input().split())

print((a + b) % 24)

Solution (Python):
A,B=map(int, input().split())
print(A+B-int(A+B>=24)*24)

Solution (Python):
a,b=map(int,input().split())
print((a+b)%24)

Solution (Python):
a, b = map(int, input().split());print((a+b)%24)

Solution (Python):
a,b=list(map(int,input().split()))
print((a+b)%24)

Solution (Python):
def remaining_time(A: int, B: int)->int:
    return (A+B) % 24


if __name__ == "__main__":
    A, B = map(int, input().split())
    ans = remaining_time(A, B)
    print(ans)

Solution (Python):
a,b = map(int,input().split())
print( (a + b ) %  24)

Solution (Python):

from collections import defaultdict
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007


a,b = LI()
print((a+b)%24)



"""
n = I()
ans = int(math.log10(n)+1)
for i in range(2,int(n**0.5)+1):
    if n%i == 0:
        ans = min(ans, max(int(math.log10(i)+1),int(math.log10(n//i)+1)))
print(ans)
"""


"""
n,a,b = LI()
v = LI()
v.sort()
v = v[::-1]
ans = v[:a]
d = {}
d[ans[-1]] = 0
if ans[0] != ans[-1]:
    for i in ans:
        if i == ans[-1]:
            d[i] += 1
    k = d[i]
    d[i] = 0
    for i in v:
        if i == ans[-1]:
            d[i] += 1
    c = 1
    for j in range(min(k,d[ans[-1]]-k)):
        c *= d[ans[-1]]-j
        c //= j+1
else:
    for i in v:
        if i == ans[-1]:
            d[i] += 1
    c = 0
    for k in range(a,min(d[ans[-1]],b)+1):
        p = 1
        for j in range(min(k,d[ans[-1]]-k)):
            p *= d[ans[-1]]-j
            p //= j+1
        c += p
print(sum(ans)/a)
print(c)
"""

Solution (Python):
x,y=map(int,input().split(' '))
z=x+y
if z>23:
    z=z-24
    print(z)
else:
    print(z)

Solution (Python):


a, b = map(int, input().split())
t = a + b
if t >= 24:
    t -= 24
print(t)

Solution (Python):
A, B = list(map(int, input().split()))

C = (A+B)//24
print(A+B-C*24)

Solution (Python):
a,b=map(int,input().split())
print((a+b)%24)

Solution (Python):
a,b = map(int,input().split())
if a+b>=24:
    print(a+b-24)
else:
    print(a+b)