Tim is taking the train to Seattle to visit his grandparents. He was given $15 to spend on snacks and reading material. Granola bars cost $1.15 each, and magazines cost $1.25. If tim buys the same number of granola bars and magazines, how many can he buy?