ex 2 - math calculation