GET_NUMBER = gets.to_i output_string = '1' * (GET_NUMBER / 2) unless remaining_match % 2 == 0 output_string[0] = '7' end puts output_string