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 in Fortran (gfortran v4.8.4) (judge verdict: Runtime Error)

program main
  implicit none
  integer(16)::N,A,B
  integer(16),allocatable,dimension(:,:)::C
  integer(16),allocatable,dimension(:)::v
  integer(16)::i
  integer(16),parameter::mo=10**9+7_16
  real(16)::ANS1
  integer(16)::ANS2
  integer(16)::cnt,cnt2
  read*,N,A,B
  allocate(v(N))
  read*,v
  call heapsort(N,v)
  ANS1=0
  do i=N,N-A+1,-1
   ANS1=ANS1+v(i)
  end do
  ANS1=ANS1/real(A)
  print"(f0.20)",ANS1
  call comb_table(N)

  if(v(N)/=v(N-A+1))then
   cnt=0
   do i=N,1,-1
      if(v(i)/=v(N-A+1))exit
      cnt=cnt+1
   end do
   cnt2 = count(v(n-a+1:n) == v(n-a+1))
   ANS2=C(cnt,cnt2)
  else
   cnt=A
   do i=N-A,1,-1
      if(v(i)/=v(N))exit
      cnt=cnt+1
   end do
   ANS2=0
   do i=A,B
      ANS2=ANS2+C(cnt,i)
   end do
  endif
  print"(i0)",ANS2
contains
subroutine heapsort(n,array)
  implicit none
!ここの入力は状況に応じて変更すること
  integer(16),intent(in) :: n
  integer(16),intent(inout) :: array(1:n)
  integer(16)::i,k,j,l
  integer(16):: t

  l=n/2+1
  k=n
  do while(k /= 1)
     if(l > 1)then
        l=l-1
        t=array(L)
     else
        t=array(k)
        array(k)=array(1)
        k=k-1
        if(k == 1) then
           array(1)=t
           exit
        endif
     endif
     i=l
     j=l+l
     do while(j<=k)
        if(j < k)then
           if(array(j) < array(j+1))j=j+1
        endif
        if (t < array(j))then
           array(i)=array(j)
           i=j
           j=j+j
        else
           j=k+1
        endif
     enddo
     array(i)=t
  enddo
  return
end subroutine heapsort
subroutine comb_table(N)
   integer(16)::N
   integer(16)::i,j
   allocate(C(0:N,0:N))
   C=0
   do i=0,N
      do j=0,i
         if(j==0 .or. j==i)then
            C(i,j)=1
         else
            C(i,j)=C(i-1,j-1)+C(i-1,j)
         endif
      end do
   end do
end subroutine
end program main