#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<stack>
#include<cstdlib>
#include<string>
#include<bitset>
#define INF 100000000
#define fi first
#define se second
#define debug(x) cout<<#x<<"="<<x<<endl
using namespace std;
typedef long long LL;
typedef pair<int,int> pii;
int c[][],a[];
char s[];
int main()
{
freopen("david.in","r",stdin);
freopen("david.out","w",stdout);
c[][]=;
c[][]=;
c[][]=,c[][]=;
c[][]=;
c[][]=,c[][]=;
c[][]=;
c[][]=,c[][]=;
c[][]=,c[][]=,c[][]=;
int n,i,j;
cin>>n;
scanf("%s",s+);
for(i=;i<=n;i++)
{
for(j=;j<=;j++)
a[j]+=c[s[i]-][j];
}
for(j=;j;j--)
while(a[j])
printf("%d",j),a[j]--;
cout<<endl;
return ;
}
// davidlee1999WTK 2015/
// srO myk Orz
//ios::sync_with_stdio(false);