n = gets.to_i
num = arr[] 
even = arr[]
num = 1..n
i = 0
for(i <= n) 
  num_num = num[i]
  if(num_num % 2 == 0) 
    even.push(num_num)
    i =+1
  else
  i =+1
end
num_max = num.length
even_max = even.length
puts "#{even_max % num_max}"

  
  
