program main
integer :: a, b, c, d

read *, a, b, c     
d = a - b
d = c - d

if(d <= 0) then
   print *, '0'                                                                                      
else
   print *, d
end if
end program main