#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
int main() {
int n;
string res;
cin >> n;
while(n) {
if(n & 1) n = (n-1) >> 1, res += '2';
else n = (n-2) >> 1, res += '3';
}
cout << string(res.rbegin(), res.rend()) << endl;
return 0;
}