The Sun is a THIRD generation star. What I mean by this is that there are chemical elements in the Sun that were made inside another star, but that star itself can only have made those elements because it had material in it that had must have been made inside a previous stars. Eventually we get back to the first generation stars, born out of primordial gas from the big-bang that contained almost no heavy elements at all.

That is quite a mouthful, so let me explain using an example - Barium.

There is Barium in the Sun. We can tell that by looking at the spectrum and seeing absorption lines due to Barium. But Barium cannot be made in the Sun. The Barium is made via the [s-process][1], which involves the slow capture of neutrons onto the nuclei of iron-peak elements. This happens during the [asymptotic red giant branch phase][2] of stellar evolution, and the Sun has 6 billion years or so before it gets to that point. [NB: only about half the abundance of chemical elements beyond iron is produced by supernovae explosions.]

So, before the Sun, there must have existed a star - probably an intermediate mass star, which evolved to become a giant, made barium in its interior, then lost its envelope through a massive wind into the interstellar medium, and that material was incorporated into the protosun.

But wait a minute! That previous star must have already had iron-peak elements in its interior to act as seed for the s-process production of Barium. These were not and could not be made in that star. They must have been made in a previous star, probably a massive star, that burned through all the nuclear fusion stages before exploding as a supernova, casting heavy elements, including iron-peak elements, into the interstellar medium. This previous star could also have been a second generation star with its own ancestors, but ultimately as we go back in time we reach a point where the previous star was a *first* generation star, made from primordial H/He gas, with almost no heavy elements. 

So that is why I claim the Sun can be classed as a "third generation star" - it contains atoms/nuclei that must have been inside *at least* two previous stars.

But you should not take this too literally. There are grains of material trapped inside meteorites that consist of solids that were already present in the pre-solar material. These are important because these grains were thought to have formed in individual stellar events and their isotopic compositions can be studied. These tell us that the Sun formed from material that has been inside *many* different stars of different types.

Stellar evolution and nucleosynthesis calculations tell us the same story. For example, whilst most of our oxygen was made in massive stars that underwent a core collapse supernova, such events do not produce much carbon. The C/O ratio tells us that most of our carbon comes via the winds from intermediate mass AGB stars. Heavy elements like Uranium are dominantly produced in supernovae, but others like Barium are not.

The details of how many generations have preceded the Sun and Earth has no single answer. Much of the solar hydrogen and helium could be pristine; some will have been through more than one star. Heavier elements (bar some lithium) will have been through at least one star. The fact that we have s-process elements like La and Ce, which are formed by neutron capture onto iron-peak elements, tells us those have been through at least two stars. 

However, these are vast understimates. Mixing in the interstellar medium is reasonably effective. The material spewed out from supernovae and stellar winds 5-12 billion years ago has had plenty of time to mix throughout the Galaxy before the Sun's birth. Turbulence and shear instabilities should distribute material on galactic length scales in a billion years or less ([Roy & Kunth 1995][3]; [de Avillez & Mac Low 2003][4]), though local inhomogeneities associated with nearby recent events can persist over $10^{8}$ years. If this is the case, then the Sun is the product of the $\sim$ billion stars that died before it was born.

The reason you are confused with your lifetime argument is that you have ignored the possibility of the Sun being made from stars that lived *at the same time* in different parts of the Galaxy. The material that they ejected near the end of their lives has just been thoroughly mixed up.




  [1]: https://en.wikipedia.org/wiki/S-process
  [2]: https://en.wikipedia.org/wiki/Asymptotic_giant_branch
  [3]: http://adsabs.harvard.edu/full/1995A%26A...294..432R
  [4]: http://arxiv.org/abs/astro-ph/0208441