program main
  implicit none
  integer :: n, i, cur, res = 0
  integer, allocatable :: v(:), c(:)

  read *, n
  allocate (v(n), c(n))
  read *, v
  read *, c
  
  do i = 1, n
    cur = v(i) - c(i)
    if (cur > 0) res = res + cur
  end do

  print '(i0)', res

end program
