A man discovered he had only $5 bills and $1 bills. The number of $1 bills was 4 more than 3 times the number of $5 bills. He had a total of $36. How many of each kind of bill did he have?​