Let Cg(x) denote the smallest integer greater than or equal…