Program to find the number of men initially | Java implementation of the approach ; Function to return the number of men initially ; Driver code
import java . util . * ; class GFG { static int numberOfMen ( int D , int m , int d ) { int Men = ( m * ( D - d ) ) / d ; return Men ; } public static void main ( String args [ ] ) { int D = 5 , m = 4 , d = 4 ; System . out . println ( numberOfMen ( D , m , d ) ) ; } }