Checking a payslip using addition and multiplication