let cross (x0,y0) (x1,y1) = x0*.y1-.x1*.y0;;

let () =
  let n = Scanf.scanf " %d\n" (fun x -> x) in
  let a = Array.init n (fun x -> Scanf.scanf " %f %f\n" (fun y z -> (y, z))) in
  let f i =
    let p0x, p0y = a.(i mod n) and
        p1x, p1y = a.((i+1) mod n) and
        p2x, p2y = a.((i+2) mod n) in
    let v0 = (p1x-.p0x, p1y-.p0y) and
        v1 = (p2x-.p1x, p2y-.p1y) in
    if cross v0 v1 >= 0. then 1
    else 0
  in
  let rec loop = function
      i when Array.length a = i -> Printf.printf "%d\n" 1
    | i -> if f i = 0 then Printf.printf "%d\n" 0
           else loop (i+1)
  in loop 0
;;