Calculate for positive integer