Farmer Brown and Farmer Green were talking over their fence one afternoon. Farmer Brown said, "If you gave me one of your cows, we would have the same number of cows." Farmer Green said, "If you gave me one of your cows, I would have twice as many cows as you." How many cows do they have in total?