$stickCount=; chomp($stickCount); $digitCount = int($stickCount / 2); $rest = $stickCount % 2; $lastEqualSeven = (0<$rest); $strCount = "1"; if( $lastEqualSeven ) { $strCount = "7"; } for( $i=1; $i < $digitCount; $i++ ) { $strCount .= "1"; } print("${strCount}\n");