#! ruby # yukicoder My Practice # author: Leonardone @ NEETSDKASU count = 0 1000.times do |i| n, k = gets.split.map(&:to_i) if (n.even? && k.even?) || (n.odd? && k.odd?) count += 1 end end puts 1000 - count =begin N=5 K=3 S 1 L S 234 5 S 12 L S 34 5 S 123 L S 4 5 N=6 K=3 S 1 L S L 2 345 6 L S L 234 5 6 L S L 23 45 6 N=5 K=4 S L 1234 5 N=6 K=4 S L S 1 2345 6 S L S 1234 5 6 N=7 K=3 S L S L S 1 2 345 6 7 12 345 6 7 =end