From al-Khowarizmi's Algebra: Ten dinar is divided equally among a group of men so that when 6 more men are added to their number and 40 dinar is divided equally among them, then each receives as much as he did previously. Find the original number of men.