a, b = gets.split.map &:to_i p (a..b).count{|c|(a+b+c)%3<1}