#include <iostream>
#include <list>
#include <algorithm>
int main ()
{
list<int> l(5,0);
copy(l.begin(),l.end(),
ostream_iterator<int>(cout," "));
cout << endl;
cout << "Size of list = "
<< l.size() << endl;
int size = l.size();
while ( !l.empty() )
{
l.pop_front();
cout << "Size of list = "
<< l.size() << endl;
}
return 0;
}