Josiah baked 24 cookies. He gave 1/6 of them to his family before he took them to his friend's house. How many cookies did he give his family?