let solve n = let rec inner n acc = if n = 0 then acc else if n mod 15 = 0 then inner (n-1) (acc+4) else if n mod 3 = 0 || n mod 5 = 0 then inner (n-1) (acc+2) else inner (n-1) acc in print_int @@ inner n 0 let _ = let n = int_of_string @@ read_line() in solve n