For each case we start by adding the total number of hours, then we count the number of hours worked from Monday to Saturday and check if it is a number over 40, if it is we subtract 40 hours from the total number of hours to get the number of overtime hours. Finally, we consider the number of doubled paid hours.