a,b,c = gets.split.map(&:to_i) puts c - [b <= c, a <= c].select { _1 }.count