244 - Compute the K function

Compute the K function