Dolphin enjoys participating in programming contests and is about to take part in an AtCoder contest. In this country, they use a 24-hour clock system. Given the current time as A o'clock and the contest starting in B hours, determine the time when the contest will begin in 24-hour format. Constraints: 0 ≤ A,B ≤ 23, where A and B are integers. The input is given in the format A B, and the output should be the starting time of the contest in 24-hour format. For example, if the input is 9 12, the output should be 21. If the input is 19 0, the output should be 19, indicating that the contest has just started. If the input is 23 2, the output should be 1, indicating that the contest will begin at 1 o'clock the next day.

# Buggy version:
s = list(map(int, input().split()))
n=s[0]
k=s[1]
print((n+k))
        

# Fixed version:
s = list(map(int, input().split()))
n=s[0]
k=s[1]
print((n+k)%24)

# Buggy version:
A,B = map(int, input().split())
# N = int(input())
# A = int(input())
print((A % 24) + B)

# Fixed version:
A,B = map(int, input().split())
# N = int(input())
# A = int(input())
print((A + B) % 24)

# Buggy version:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

if __name__ == '__main__':
    a = [int(i) for i in input().split()]
    print(a[0]+a[1] %24)

# Fixed version:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

if __name__ == '__main__':
    a = [int(i) for i in input().split()]
    print((a[0]+a[1] )%24)

# Buggy version:
# coding: utf-8
# Your code here!
a, b = map(int,input().split())

print(a + b)

# Fixed version:
# coding: utf-8
# Your code here!
a, b = map(int,input().split())

print((a+b) % 24)

# Buggy version:
A,B=map(str,input().split())
#print(sorted(B)[0])
print((A+B)%24)

# Fixed version:
A,B=map(int,input().split())
#print(sorted(B)[0])
print((A+B)%24)

# Buggy version:
a,b = list(map(int, input().split()))

res = (a+b)%24

# Fixed version:
a,b = list(map(int, input().split()))
res = (a+b)%24
print(res)

# Buggy version:
a,b=map(int,input().split())
print((a+b+12)%24)

# Fixed version:
a,b=map(int,input().split())
print((a+b+12-12)%24)

# Buggy version:
def r_t(n):
    return sum(map(int, n.split()))%24
r_t(input())

# Fixed version:
def r_t(n):
    return sum(map(int, n.split()))%24
print(r_t(input()))

# Buggy version:
A,B=map(int,input().split())
print((a + b) % 24)

# Fixed version:
A,B = map(int,input().split())
a = (A+B)%24
print(a)

# Buggy version:
a,b=map(int,input().split());print(sum(a,b)%24)

# Fixed version:
a=map(int,input().split());print(sum(a)%24)

# Buggy version:
a, b = (int(i) for i in input().split())  
print (a+b)%24

# Fixed version:
a,b = (int(i) for i in input().split())

print((a+b)%24)

# Buggy version:
num = list(map(int, input().split()))
a = num[0] + num[1]
print(int(a/24))


# Fixed version:
num = list(map(int, input().split()))
a = num[0] + num[1]
print(int(a%24))

# Buggy version:
print(eval(int,input().replace(" ","+"))%24)

# Fixed version:
print(eval("("+input().replace(' ','+')+")%24"))

# Buggy version:
n,m = map(int,input().split())

print((n+m%24))

# Fixed version:
n,m=map(int,input().split());print((n+m)%24)

# Buggy version:
def read_int_list():
    return list(int(i) for i in input().split())
x,y = read_int_list()
print((x+y)%12)

# Fixed version:
def read_int_list():
    return list(int(i) for i in input().split())
    
x,y = read_int_list()
print((x+y)%24)

# Buggy version:
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)

# Fixed version:
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)

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

# Fixed version:

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

# Buggy version:
# coding: utf-8
import sys

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

# Fixed version:
# coding: utf-8
import sys

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

# Buggy version:
time = input()
ans = time.split()
print(int(ans[0]) + int(ans[1]) % 24)

# Fixed version:
time = input()
ans = time.split()
print((int(ans[0]) + int(ans[1])) % 24)

# Buggy version:
def main():
    A, B = tuple(map(int, raw_input().split(' ')))
    print('{}'.format((A+B)%24))


if __name__ == '__main__':
    main()


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


if __name__ == '__main__':
    main()

# Buggy version:
if __name__ == "__main__":
    times = [int(time) for time in input().split()]
    print((A+B)%24)

# Fixed version:
if __name__ == "__main__":
    times = [int(time) for time in input().split()]
    A = times[0]
    B = times[1]
    print((A+B)%24)

# Buggy version:
# -*- coding: utf-8 -*-
A, B = map(int, input().split())
print("%d" % (A+B%24))


# Fixed version:
# -*- coding: utf-8 -*-
A, B = map(int, input().split())
print("%d" % ((A+B)%24))

# Buggy version:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

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


# Fixed version:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

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

# Buggy version:
N, K = list(map(int, input().split()))
print(N+K%24)

# Fixed version:
N, K = list(map(int, input().split()))
print((N+K)%24)

# Buggy version:
# -*- coding: utf-8 -*-


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


print((main())


# Fixed version:
# -*- coding: utf-8 -*-


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


print(main())

# Buggy version:
a,b = map(int,input().split())
print((a+b)%24+1)

# Fixed version:
a, b = map(int, input().split())
print ((a+b)%24)

# Buggy version:
a, b = map(int, input().split(" "))

print(a+b%24)

# Fixed version:
a,b = input().split(" ")
a = int(a)
b = int(b)
print((a + b) % 24)

# Buggy version:
A, B = map(int. input().split())

print((A + B) % 24)

# Fixed version:
A, B = map(int, input().split())
A += B
A %= 24
print(A)

# Buggy version:
a, b = map(int, split.input())
print((a+b)%24)

# Fixed version:
a,b = map(int,input().split(' '))
print((a+b)%24)

# Buggy version:
A, B = map(int, input().split())

ans = A + B % 24

print(ans)

# Fixed version:
A, B = list(map(int, input().split()))

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