def main():
    N = int(input())
   
    if N % 2 != 0 and N >= 3:
        ans = "7"
        N -= 3
    else:
        ans = ""

    ans = ans + str(1) * (N // 2)
    print(ans)

if __name__ == '__main__':
    main()