#include <fstream>
using namespace std;
ifstream fin("policefm.in");
ofstream fout("policefm.out");
int main()
{
int p, n = 0, k = 9, putere = 1;
cin>>p;
if(p == 1) n = 1;
while(p > 1 && k > 1)
{
while(p % k == 0)
{
n += putere * k;
putere *= 10;
p /= k;
}
--k;
}
fout<<n;
}