import Foundation

var num = Int(readLine()!)!

let odd = true
let count = 0
let currentNum = 1

for currentNum in 1...num {
  if count {
    odd == false
    currentNum += 1
    count += 1
  } else {
    codd == true
    currentNum +=1
  }
}
print(count)