const rl = require("readline").createInterface({ input: process.stdin });
var iter = rl[Symbol.asyncIterator]();
const readline = async () => (await iter.next()).value;
void async function () {
let result = [] //存放操作记录的数组
let n = parseInt(await readline())
while(n > 0) {
if(n % 2 == 0) {
n = (n - 2) / 2;
result.unshift(3) //每次操作都是放入数组首部
}else {
n = (n - 1) / 2;
result.unshift(2)
}
}
console.log(result.join(''))
}()