gets numbers = gets.split.map puts numbers.inject(0) { |count, i| numbers.count(i) == 1 ? count += 1 : count }