You'd also have to define
unproductive.
Spending a few decades thinking about the meaning of life might be considered unproductive - or it could be considered "being a philosopher". (Most) art is arguably fundamentally "unproductive". I suppose one might say that if you, over time, don't impart some impact on the people around you (share a work of art, pass on wisdom, [ed:raise] (and/or) feed a child...) then you've been "unproductive".
But are you a philosopher by virtue of achieving enlightenment or by virtue of helping others achieve enlightenment? If you died before you came to a crucial insight -- was your time spent thinking up to that point "unproductive"?