#!/usr/bin/env ruby input = $stdin.readlines.map(&:strip).map(&:to_i) puts input.map{ |x| (x / 3) - 2 }.sum