n = gets.to_i
if n.odd?
	puts 1
else
	puts n / 2 + 1
end