Number of unmarked integers in a special sieve | Java Program to determine the number of unmarked integers in a special sieve ; Driver Code
import java . io . * ; class GFG { static int countUnmarked ( int N ) { if ( N % 2 == 0 ) return N / 2 ; else return N / 2 + 1 ; } public static void main ( String [ ] args ) { int N = 4 ; System . out . println ( " Number ▁ of ▁ unmarked ▁ " + " elements : ▁ " + countUnmarked ( N ) ) ; } }