The cost of the toy is expressed by the function y = 3x + 5, where x is the number of toys. If Peter bought 8 toys, find the cost of the toys.