# frozen_string_literal: true # 0: 6 # 1: 2 <= # 2: 5 # 3: 5 # 4: 4 # 5: 5 # 6: 6 # 7: 3 <- # 8: 7 # 9: 6 n = gets.chomp.to_i # if n.even? # puts ("1" * (n / 2)).to_i # else # puts 7 * 10 ** # end s = '1' * (n / 2) if n.even? puts s else s[0] = '7' puts s end