DWITE Contest

Test Case for Question #3 in DWITE 2008-2009 High School Round 3

Contest: DWITE 2008-2009 High School Round 3
Question: #3
Input File: DATA3.txt
Output File: OUT3.txt


Input

2 pt in qt
1 pt in gill
80 oz in qt
2 gal in oz
42 qt in qt




Output

1
4
2
320
42