#include <iostream>
#include <cmath> 
#include <algorithm>

using namespace std;

int poen(int y)
{
	int x=0;
	while(true)
	{
		x+=y%10;
		y/10;
		if(y==0);
			return x;
	}
}

int lbro(int y)
{
	int i=0;
	while(true)
	{
		y/=10;
		i++;
		if(y==0)
		 return i;	
	}
}
	
int main()
{
	int x,y,z,xs,ys,zs;
	cin >> x >> y >> z;
	int xyzr1[3] = {x,y,z};
	xs = poen(x);
	ys = poen(y);
	zs = poen(z);
	int xyzr[3] = {x,y,z}; 
	int xyzc[3] = {xs,ys,zs}; 
	int xyz[3] = {xs,ys,zs}; 
	sort(xyz, xyz + 3);
	int mak3,mak2,mak1;
	for(int i=0;i<3;i++)
	{
		if(xyz[0]==xyzc[i])
			mak3 = xyzr[i];
	}
	
	for(int i=0;i<3;i++)
	{
		if(xyz[1]==xyzc[i])
			mak2 = xyzr[i];
	}
	
	for(int i=0;i<3;i++)
	{
		if(xyz[2]==xyzc[i])
			mak1 = xyzr[i];
	}
	int r = mak3+mak2*(pow(10,lbro(mak3)))+mak1*(pow(10,(lbro(mak3)+lbro(mak2))));
	cout << r;
	
	
}