Patrick has 4 hours less than twice the amount of time that Greg has left to finish his homework. Greg has six hours less than Jacob left to finish his homework. If Jacob has 18 hours left to finish his homework, calculate the total number of hours they all have left to finish their homework?
If Jacob has 18 hours left to finish his homework, Greg has 18-6 = <<18-6=12>>12 hours left to finish his homework.
The total number of hours Jacob and Greg have left to finish their homework is 12+18 = <<12+18=30>>30 hours.
Patrick has 4 hours less than twice Greg has left to finish his homework, meaning Patrick has 4 hours less than 12*2 = 24 hours left to finish his homework.
Patrick has 24-4 = <<24-4=20>>20 hours left to finish his homework.
Altogether, the three have 30+20 = <<30+20=50>>50 hours left to finish their homework.
#### 50
Below is an instruction that describes a task. Write a response that appropriately completes the request.

### Instruction:
You are solving math problems. Here are some examples of how to solve the task:

Adrianna has 10 pieces of gum to share with her friends. There wasn't enough gum for all her friends, so she went to the store to get 3 more pieces of gum. She gave out gum to 11 friends. How many pieces of gum does Adrianna have now?After buying 3 pieces of gum Ariana has 10 + 3 = <<10+3=13>>13 pieces of gum.
After giving her 11 friends gum Ariana has 13 - 11 = <<13-11=2>>2 pieces of gum left.
#### 2[END]

After a trip, Mrs. Nalani took the students to the restaurant and told them they could order either a burger or a hot dog. If the number of students who ordered burgers was 30, twice the number of students who called for a hot dog, calculate the number of students at the restaurant.If the 30 students who ordered burgers were twice the number of students who ordered hot dogs, then 30/2 = <<30/2=15>>15 students ordered hot dogs.
The total number of students is 15 + 30 = <<15+30=45>>45
#### 45[END]

Now, solve this next question in the style of the above examples:

Patrick has 4 hours less than twice the amount of time that Greg has left to finish his homework. Greg has six hours less than Jacob left to finish his homework. If Jacob has 18 hours left to finish his homework, calculate the total number of hours they all have left to finish their homework?

### Response:
If Jacob has 18 hours left to finish his homework, Greg has 18-6 = <<18-6=12>>12 hours left to finish his homework.
The total number of hours Jacob and Greg have left to finish their homework is 12+18 = <<12+18=30>>30 hours.
Patrick has 4 hours less than twice Greg has left to finish his homework, meaning Patrick has 4 hours less than 12*2 = 24 hours left to finish his homework.
Patrick has 24-4 = <<24-4=20>>20 hours left to finish his homework.
Altogether, the three have 30+20 = <<30+20=50>>50 hours left to finish their homework.
#### 50