Joe studied math for x minutes, and then studied Spanish for 20 minutes more than he studied math. He did this for 3 days in a row. How long did Joe study for all three days?