Bollobás proved that for every k and ℓ such that kZ+ℓ contains an even number, an n-vertex graph containing no cycle of length ℓmodk can contain at most a linear number of edges. The precise (or asymptotic) value of the maximum number of edges in such a graph is known for very few pairs ℓ and k. In this work we precisely determine the maximum number of edges in a graph containing no cycle of length 0mod4.