[18] The head, neck, breast and vent are glossy black with a metallic green and violet sheen; the belly and scapulars (shoulder feathers) are pure white; the wings are black glossed with green or purple, and the primaries have white inner webs, conspicuous when the wing is open.[19] The preferred habit is open countryside with scattered trees and magpies are normally absent from treeless areas and dense forests.[24] Magpies are normally sedentary and spend winters close to their nesting territories but birds living near the northern limit of their range in Sweden, Finland and Russia can move south in harsh weather.In the courtship display, males rapidly raise and depress their head feathers, uplift, open and close their tails like fans, and call in soft tones quite distinct from their usual chatter.The loose feathers of the flanks are brought over the primaries, and the shoulder patch is spread so the white is conspicuous, presumably to attract females.Magpies prefer tall trees for their bulky nest, firmly attaching them to a central fork in the upper branches.[29][30] Small for the size of the bird, they are typically pale blue-green, with close specks and spots of olive brown, but show much variation in ground and marking.[33] Initially the parents eat the faecal sacs of the nestlings, but as the chicks grow larger, they defecate on the edge of the nest.[19] A study conducted near Sheffield in Britain, using birds with coloured rings on their legs, found that only 22% of fledglings survived their first year.[39][40] The magpie is omnivorous, eating young birds and eggs, small mammals,[41] insects, scraps and carrion, acorns, grain, and other vegetable substances.The Eurasian magpie's nidopallium is approximately the same relative size as those in chimpanzees and humans, and significantly larger than those of the gibbons.[42] A 2004 review suggests that the intelligence of the corvid family to which the Eurasian magpie belongs is equivalent to that of the great apes (bonobos, gorillas and orangutans) in terms of social cognition, causal reasoning, flexibility, imagination and prospection.This is indicated by tool use, an ability to hide and store food across seasons, episodic memory, and using their own experience to predict the behavior of conspecifics.In captivity, magpies have been observed counting up to get food,[clarification needed] imitating human voices, and regularly using tools to clean their own cages.[50] An English tradition holds that a single magpie be greeted with a salutation in order to ward off the bad luck it may bring.[52] In Britain and Ireland, a widespread traditional rhyme, "One for Sorrow", records the myth (it is not clear whether it has been seriously believed) that seeing magpies predicts the future, depending on how many are seen.[50][53] In Italian, British and French folklore, magpies are believed to have a penchant for picking up shiny items, particularly precious stones or metal objects.Rossini's opera La gazza ladra and The Adventures of Tintin comic The Castafiore Emerald are based on this theme.