Devin tried to divide his books evenly between his 3 shelves, but he had some left over. If he put 5 books on each shelf and had 3 left over, how many books did he have in all?