Daniel raises some ducks and dogs. Together, all the ducks and dogs have a total of 18 legs and 5 pairs of wings. If all the ducks and dogs each lift one leg off the ground, how many legs are still on the ground? Let's think step by step and output the final answer within \boxed{}.
user