Calculating total amount - halfway