#include<iostream>
#include<conio.h>
using namespace std;
class JamArghamClass
{
	private :
		int i, Sum = 0;
	public :
		int x;
		int JamArgham()
		{
			for(i = 0; x > 0; i++)
			{
				Sum += x % 10;
				x /= 10;
			}
		}
		int GetSum()
		{
			return Sum;
		}	
};

int main()
{
	JamArghamClass A;
	cout << "yek adad vared konid : ";
	cin >> A.x;
	A.JamArgham();
	cout << "Jame Argham = " << A.GetSum() << endl;
	getch();
}

