The Calculation of Distributions of Two-Sided Kolmogorov-Smirnov Type Statistics