const lines = require('fs') .readFileSync('/dev/stdin', 'utf-8') .trim().split('\n').values(); const N = Number(lines.next().value); console.log((N % 2 ? '7' : '1') + '1'.repeat(N / 2 - 1));