cnt = 0 x,y,z = gets.chomp.split(" ").map(&:to_i) for i in 1..z do next if i == x or i ==y cnt +=1 end puts cnt