array = Array.new
count = 0
n = gets.chomp.to_i
n.times do
  array.push(gets.chomp.to_i)
end
 

i = 0
while i < n 
  print array[i] 
  if i+1 != n
  print " "
  end
  i = i+1
end

print "\n"
print count
print "\n"