#include #define rep(i, ss, ee) for (int i = ss; i < ee; ++i) using namespace std; void solve1() { int N; string s; cin >> N; while (N > 3) { N -= 2; s += "1"; } if (N == 2) s += "1"; if (N == 3) s += "7"; if (s.size() > 1 && s.back() == '7') swap(s.back(), s.front()); cout << s << endl; } void solve2() { int N; cin >> N; string ans; if ((N & 1) && (N > 2)) { ans = "7"; N -= 3; } ans += string(N / 2, '1'); cout << ans << endl; } int main() { ios::sync_with_stdio(false); cin.tie(0); solve2(); getchar(); }