#include #include using namespace std; int main() { int N; int multiplier=1; int one=0, seven=0; cin >> N; if (N % 2 && N>=3) { seven++; N -= 3; } one = N / 2; N = 0; while (one) { N += multiplier; one--; multiplier *= 10; } if(seven) N += multiplier * 7; cout << N; return 0; }