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):
a,b = map(int,input().split())

if a + b >= 24:
    print('{}'.format(a+b-24))
else:
    print('{}'.format(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())
print((a+b)%24)

Solution (Python):

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

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

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

if a + b <= 23:
    print(a + b)
else:
    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())
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):
print(sum(map(int,input().split()))%24)

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

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

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

b = a[0] + a[1]
if b >= 24:
  b -= 24
print(b)

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

Solution (Python):


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

if 23 < (a + b):
    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())
intTime = A + B
if intTime >= 24:
    intTime = A + B - 24
print(intTime)

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())
C=A+B
if C<24:
    print(C)
else:
    print(C-24)

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

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-24)
else:
    print (time)

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

Solution (Python):
lines = input().split(' ')
A = int(lines[0])
B = int(lines[1])

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

Solution (Python):
lines = str(input()).split(' ')
A = int(lines[0])
B = int(lines[1])

now = A + B

while now >= 24:
	now -= 24

print(now)

Solution (Python):
lines = str(input()).split(' ')
A = int(lines[0])
B = int(lines[1])

now = A + B

while now >= 24:
	now -= 24

print(now)

Solution (Python):
a, b = list(map(lambda x: int(x), input().split(" ")))

print((a+b)%24)

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

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

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())
c = a + b

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

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

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

Solution (Python):
print(sum(list(map(int, input().split())))%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):
a, b = map(int, input().split())
print((a + b) % 24)

Solution (Python):





if __name__ == '__main__':
    current_hour, add_hour = list(map(int, input().split()))
    contest_hour = current_hour + add_hour

    if contest_hour < 24:
        print(contest_hour)
    else:
        print(contest_hour - 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 = (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 = [int(s) for s in input().split()]
ret = (A + B) % 24
print(ret)

Solution (Python):



import math
import re
import sys


def getinputdata():

    
    array_result = []
    
    data = input()

    
    array_result.append(data.split(" "))

    flg = 1

    try:


        while flg:

            data = input()

            array_temp = []

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:


        return array_result




arr_data = getinputdata()

a = int(arr_data[0][0])
b = int(arr_data[0][1])

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):
import sys

stdin = sys.stdin
ni = lambda: int(stdin.readline())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

t = na()
if t[0]+t[1] >= 24:
    print(t[0]+t[1]-24)
else:
    print(t[0]+t[1])

Solution (Python):
su = sum(map(int, input().split()))
print(su - 24 if su > 23 else su)

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())
 
h = a + b
 
if h < 24:
  print(h)
else:
  print(h - 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())
x=a+b
if(x>=24):
  print(x-24)
else:
  print(x)

Solution (Python):

"""
https://beta.atcoder.jp/contests/abc057/tasks/abc057_a

"""
import sys
from sys import stdin
input = stdin.readline


def solve(A, B):
    return (A + B) % 24


def main(args):
    A, B = map(int, input().split())
    ans = solve(A, B)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Solution (Python):
a,b=map(int,input().split())
if 24<=a+b:
    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())

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)
else: 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):
import sys
a, b = map(int, sys.stdin.readline().split())

print((a+b)%24)

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

Solution (Python):
n = input().split()
m = list(map(int, n))
i = m[0] + m[1]
if 24 <= i:
  print(i - 24)
else:
  print(i)

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


if __name__ == "__main__":
    main()

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

C = A + B

if C <= 23:
	print(C)
if C >= 24:
	print(C % 24)

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

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

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

Solution (Python):
num = [int(x) for x in input().split()]

print(num[0]+num[1] if num[0]+num[1] < 24 else num[0]+num[1]-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 = map(int, input().split())
print((A + B) % 24)

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

hour = ls[0] + ls[1]

print(hour % 24)

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

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

print((a + b) % 24)

Solution (Python):
A, B = [int(n) for n 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, raw_input().split())

print (a + b) % 24

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

Solution (Python):
a, b = [int(i) for i in 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):
def read_int_list():
    return list(int(i) for i in input().split())
    
x,y = read_int_list()
print((x+y)%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(x) for x in input().split()]
print((a+b)%24)

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

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


if __name__ == "__main__":
    main()

Solution (Python):
def inint(): return int(input())
def inlint(): return list(map(int, input().split()))
def infloat(): return float(input())
def inlffloat(): return list(map(float, input().split()))
def inl(): return list(input())
def putlint(): return "".join(list(map(str, ans)))

a,b = inlint()

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

print(a)

Solution (Python):

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

Solution (Python):
input_line1 = map(int,raw_input().split(" "))


a = input_line1[0]
b = input_line1[1]

n = a + b
if n >= 24:
	print n - 24
else:
	print n

Solution (Python):



import sys
import re
import math
import collections
import itertools
import functools

DEBUG = True
DEBUG = False

def dbg(*args):
    if DEBUG:
        print("DBG: ", file=sys.stderr, end="")
        print(*args, file=sys.stderr)



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

    print((A+B)%24)

if __name__ == "__main__": main()

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

sta = A + B
if (sta >= 24):
    sta = sta - 24

print(sta)

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)

else:
    print(A+B)

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

Solution (Python):
def ri(): return int(input())
def rli(): return list(map(int, input().split()))
def ris(): return list(input())
def pli(a): return "".join(list(map(str, a)))
 
a,b = rli()
print((a+b)%24)

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

add = A + B
if add > 23:
    add -= 24

print(add)

Solution (Python):
from collections import defaultdict


def main():
    A, B = map(int, 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)
else:
 print (A+B-24)

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

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

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

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

Solution (Python):
A, B = list(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):
print(sum(map(int, input().split())) % 24)

Solution (Python):
c, d = map(int, input().split())
print((c + d)%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 = input()
b = a.split()
r = int(b[0]) + int(b[1])
if r >= 24:
    r = r-24
print(r)

Solution (Python):
def solve():
  ar = raw_input().split(' ')
  A = int(ar[0])
  B = int(ar[1])
  return (A + B) % 24

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

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

if __name__ == "__main__":
    solve()

Solution (Python):
A,B = [int(x) for x in input().split(" ")]

print((A + B) % 24)

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

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

Solution (Python):
n = input()
tmp_n = n.split(" ")

a = tmp_n[0]
b = tmp_n[1]

t = int(a)+int(b)

print(int(t%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>=0:
    print(s-24)
else:
    print(s)

Solution (Python):


n,m=list(map(int, input().split()))
print((n+m)%24)

Solution (Python):
A, B = map(int, raw_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 = [int(t) for t in input().split()]


print((a+b)%24)

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

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


print (a[0]+a[1])%24

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

print((a+b) % 24 )

Solution (Python):
import sys

a, b = sys.stdin.readline().split()
print (int(a) + int(b)) % 24

Solution (Python):
b = input().split()
a = [int(b[i]) for i in range(len(b))]

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

Solution (Python):

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

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

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

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

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

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()))
x = (A + B) % 24
print(x)

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

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

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

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

s = a + b

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

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

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

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

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

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

Solution (Python):
import sys
import numpy as np
import string

A, B = (int(i) for i in input().split(" "))

start = (A + B) % 24

print(start)

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

Solution (Python):

import sys

for line in sys.stdin.readlines():
    a = line.strip().split(" ")
    a1 = int(a[0])
    a2 = int(a[1])
    print((a1+a2) % 24)

Solution (Python):
a,b = map(int, input().split())
c = a + b
if c<24:
  print(c)
else:
  print(c-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 = list(map(int, input().split()))
c = a[0] + a[1] 
if c < 24:
 print(c)
else:
 c -= 24
 print(c)

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

ans = (timeline[0] + timeline[1]) % 24
print(ans)

Solution (Python):
l = input().split()
A = l[0]
B = l[1]
C = int(A) + int(B)
time = C % 24

print(time)

Solution (Python):


AB = raw_input().split()
A = int(AB[0])
B = int(AB[1])

if A+B > 24:
    print (A+B)%24
elif A+B == 24:
    print 0
else:
    print A+B

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

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

Solution (Python):
time = input()
ans = time.split()
print((int(ans[0]) + int(ans[1])) % 24)

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())
res = a+b
if res>=24:
    print(res-24)
else:
    print(res)

Solution (Python):

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


print((A+B)%24)

Solution (Python):
time = input().rstrip().split(" ")
ans = int(time[0]) + int(time[1])
if ans >= 24:
    print( ans - 24 )
else:
    print( ans )

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

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

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

Solution (Python):

import sys,copy,math,heapq,itertools as it,fractions,re,bisect,collections as coll

A, B = map(int, raw_input().split())
print (A + B) % 24

Solution (Python):
import sys

line = sys.stdin.readline()
lst = line.split()
a = int(lst[0])
b = int(lst[1])

print ((a + b) % 24)

Solution (Python):

"""
Created on Wed Apr  5 11:19:44 2017

@author: syaga
"""

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

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

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

c = (a + b) % 24
print(c)

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

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

Solution (Python):
a, b = (int(i) for i in input().split())
sum = 0
sum = (a + b)
if (sum >= 24) :
    sum -= 24
print("%d" % sum)

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

c = (a + b) % 24

print(c)

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

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

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

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

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

Solution (Python):


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

Solution (Python):


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

output = (A + B)%24

print(output)

Solution (Python):


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

ans = A + B

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

Solution (Python):
L = [int(i) for i in input().split(' ')]
print((L[0] + L[1]) % 24)

Solution (Python):
data = list(map(int,input().split(" ")))
x = sum(data)
if x >= 24:
	print(x%24)
else:
    print(x)

Solution (Python):

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

Solution (Python):


import sys
import os

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

Solution (Python):
input_str = input()
input = input_str.split(' ')
output = (int(input[0]) +int(input[1]))%24
print(output)

Solution (Python):
input_str = input()
input = input_str.split(' ')
output = int(input[0]) +int(input[1])
if output > 23:
    output -= 24
print(output)

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

Solution (Python):
import sys
a = sys.stdin.readline()
a,b = a.strip().split(" ")
print((int(a)+int(b))%24)

Solution (Python):
l = input().split()
A = int(l[0])
B = int(l[1])

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

Solution (Python):
import numpy as np

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

Solution (Python):
def main():
    A, B = tuple(map(int, input().split(' ')))
    print('{}'.format((A+B)%24))


if __name__ == '__main__':
    main()

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

Solution (Python):
if __name__ == "__main__":
    times = [int(time) for time in input().split()]
    A = times[0]
    B = times[1]
    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):
if __name__ == '__main__':
    h1 = input()
    a, b = h1.split()
    print((int(a) + int(b)) % 24)

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

Solution (Python):
List=input().split(" ")
a=int(List[0])
b=int(List[1])
c=a+b
if c>=24:
    print(str(c-24))
else:
    print(str(c))

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(i) for i in input().split(" ")]
res = a+b if a+b<24 else a+b-24
print(res)

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

print((A + B) % 24)

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

Solution (Python):
import sys

a, b = map(int, raw_input().split())
print (a + b) % 24

Solution (Python):
lst = input().split(" ")
A =int(lst[0])
B =int(lst[1])
print((A+B)%24)

Solution (Python):
a, b = map(int, 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())
t = a+b

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

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

Solution (Python):

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

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

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

print((time[0] + time[1]) % 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):
print(sum(map(int,raw_input().split()))%24)

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

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

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

Solution (Python):
x,y = map(int, input().split(' '))
print((x+y)%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())
print((a + b) % 24)

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

Solution (Python):

num_A, num_B = map(int, input().split())
if num_A + num_B >= 24:
    print(num_A + num_B - 24)
else:
    print(num_A + num_B)

Solution (Python):


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

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):
inpt = map(int, raw_input().split())

print (inpt[0] + inpt[1]) % 24

Solution (Python):
str = input().split(' ')
a = int(str[0])
b = int(str[1])

s = a + b
res = s
if s >= 24:
  res = s - 24

print(res)

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

Solution (Python):


a,b=map(int,raw_input().split())
print (a+b)%24

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

Solution (Python):
input_lines = raw_input()
A=int(input_lines.split()[0])
B=int(input_lines.split()[1])
print (A+B)%24

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

Solution (Python):
AB = input()
if len(AB) <= 2:
    ABL = [AB]
else:
    ABL= AB.replace("\n", " ").split(" ")



A = int(ABL[0])
if len(AB) <= 2:
    C = A
else:
    B = ABL[1]
    C = int(A) + int(B )
    
if C >= 24:
    C -= 24
print(C)

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

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

Solution (Python):
import sys

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

def debug(x, table):
    for name, val in table.items():
        if x is val:
            print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr)
            return None

if __name__ == '__main__':
    solve()

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

Solution (Python):


a = input().split()
b = int(a[0]) + int(a[1])

if b >= 24:
    b = b -24

print(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 = list(map(int, input().split()))
print((a+b)%24)

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

print (a + b) % 24

Solution (Python):
A, B = map(int, input().split())
Start = (A+B)%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):
N, K = list(map(int, input().split()))
print((N+K)%24)

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

Solution (Python):
A,B = map(int, raw_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):
ab=(input())
a_,b_=ab.split()
a=int(a_)
b=int(b_)

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

Solution (Python):
import sys

INF = 10**9+7

stdin = sys.stdin
def na(): return map(int, stdin.readline().split())
def ns(): return stdin.readline().strip()
def nsl(): return list(stdin.readline().strip())
def ni(): return int(stdin.readline())
def nil(): return list(map(int, stdin.readline().split()))

a, b = nil()

print((a+b)%24)

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

if __name__ == '__main__':
    main()

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

print((a + b) % 24)

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

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

Solution (Python):
a,b=raw_input().split(' ')
a=int(a)
b=int(b)

print (a+b)%24

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

if a + b >= 24:
    answer = a + b - 24
else:
    answer = a + b

print(answer)

Solution (Python):
import sys, array, re, functools
input = lambda: sys.stdin.readline()
@functools.lru_cache(maxsize = 10000)

def Main():
  a, b = map(int, input().split())
  ans  = a + b
  if( ans < 24):
    print(ans)
  elif ans  == 24:
    print(0)
  else:
    print(ans - 24)
  
if __name__ == '__main__':
  Main()

Solution (Python):
import sys, array, re, functools
input = lambda: sys.stdin.readline()
@functools.lru_cache(maxsize = 10000)

def Main():
  a, b = map(int, input().split())
  ans  = a + b
  if( ans < 24):
    print(ans)
  elif ans  == 24:
    print(0)
  else:
    print(ans - 24)
  
if __name__ == '__main__':
  Main()

Solution (Python):
l = map(int, raw_input().split())

time=(l[0]+l[1])%24

print time

Solution (Python):
import sys, array, math, re, functools
A,B = [int(i) for i in input().split()]
OUT = (A + B) % 24
print(OUT)

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

Solution (Python):
a = input().split()
c = int(a[0])
d = int(a[1])
e = c + d 
if e == 24:
    e = 0
if e > 24:
    e -= 24
print(e)

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

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

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

result = A + B

while True:
    if 24 <= result:
        result -= 24
    else:
        break

print(result)

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

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

main()

Solution (Python):



def main():
    a, b = [int(e) for e in input().split()]
    answer = (a + b) % 24
    return answer


print(main())

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):
times = input().split()
a = int(times[0])
b = int(times[1])
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):
N, S = list(map(int, input().split()))
s = N + S
if s >= 24:
    s = s - 24
print(str(s))

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, raw_input().split())


o = (a + b) % 24



print o

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

print((a+b)%24)