let n = Int(readLine()!)!
if n < 105 { print(0) }
else if n == 105 { print(1) }
else {
  var ans = 1
  for i in 106...n {
    if i % 2 == 0 { continue }
    var count = 0
    for j in 1...i {
      if i % j == 0 { count += 1}
    }
    if count == 8 { ans += 1}
  }
  print(ans)
}