public static long HistogramSum(this int[] values) { long sum = 0; for (int i = 0; i < values.Length; i++) sum += values[i]; return sum; }