#!/usr/bin/env python num = int(raw_input()) sigma = 0 shou = num / 2 if num % 2 == 0: for i in range(shou): sigma += 10**i else: sigma += 7 * (10**(shou-1)) for i in range(shou-1): sigma += 10**i print(sigma)