You will be given a definition of a task first, then some input of the task.
The task is to generate the correct answer for a given math problem.

Problem: each week , harry is paid x dollars per hour for the first 30 hours and 1.5 x dollars for each additional hour worked that week . each week , james is paid x dollars per hour for the first 40 hours and 2 x dollars for each additional hour worked that week . last week james worked a total of 50 hours . if harry and james were paid the same amount last week , how many hours did harry work last week ?
Output:
5