#include <iostream>
#include <sstream>
#include <string>

using namespace std;

int main()
{
    ostringstream out("Kielbasa wiejska sucha");
    cout << out.str() << endl;
    out << 500 << " gr";
    cout << out.str() << endl;
    out << " opakowanie zbiorcze " << 24 << " szt.";
    cout << out.str() << endl;
    ostringstream outn("Kielbasa wiejska sucha", stringstream::ate);
    cout << outn.str() << endl;
    outn << 500 << " gr";
    istringstream in(out.str());
    double ilosc;
    string jednostka;
    in >> ilosc >> jednostka;
    cout << ilosc/6 << " " +jednostka << endl;
    return 0;
}
