int (int longIndex) { checkLongIndex(longIndex); int blockIndex = getRelevantSumIndex(longIndex); int countVisible = calculateSumForBlock(blockIndex, longIndex); if (countVisible > 0) { return countVisible - 1; } else { return 0; } }