#include<iostream>
#include <iomanip>
#include<conio.h>
using namespace std;
int main()
{
	int p, k, i, j, temp = 1;
	cout << endl << "Meghdare pool = ";
	cin >> p;
	for (i = 1; i < p/20 && temp; i++)
		for (j = 1; j < p/30 && temp; j++)
			for (k = 1; k < p/50 && temp; k++)
				if (i * 20 + j * 30 + k * 50 == p)
				{
					cout << endl << " ";
					cout << fixed << setprecision(0) << setw(3) << setfill(' ') << i;
					cout << " sekke 20 riali " << endl << " ";
					cout << fixed << setprecision(0) << setw(3) << setfill(' ') << j;
					cout << " sekke 30 riali " << endl << " ";
					cout << fixed << setprecision(0) << setw(3) << setfill(' ') << k;
					cout << " sekke 50 riali " << endl << " ";
					cout << "jam kol = " << p << " rial";
					temp = 0;
				}
	//shodani nist
	if (temp == 1)
		cout << "Mablaghe " << p << " ba seka haye 20, 30 va 50 khord nemishavad.";
	getch();
}

