Sam lived 4 miles away from his school. If he rode his bike 2/7 of the distance and then walked the rest, how far did he ride his bike?