Microscopic determination of the interlayer binding energy in graphite