Sam goes on a hiking trip and covers different segments of the trail each day. On the first day, he hikes 3 miles. On the second day, he hikes twice the distance he covered on the first day. On the third day, he hikes 1.5 times the distance he covered on the second day. On the fourth day, he hikes 2 miles less than the distance he covered on the third day. What is the total distance Sam hiked over the four days? Let's think step by step and output the final answer within \boxed{}.
user