Calculate a sum of squares of some integers, excepting negatives