Sam Snail is at the bottom of a pipe 30 feet deep. He can crawl three feet up each day, but each night he slides back two feet. How long will it take Sam to get to the surface?