#include <stdio.h>
#include <math.h>

#define n 250000

int main(){
	int age[n] = {13,13,13,13,13,13};
	int sex[n] = {1, 1, 1, 2, 2, 2}; //0=nonexistent, 1=female, 2=male
	int population = 6;
	int t;
	int i;

	for(t=0; t<107; t++){
		int newsex = 0;
		for(i=0; i<n; i++){
			if (sex[i] == 0) break;
			
			
			if( (age[i]%2==0) && (age[i]>=13) && (age[i]<=33) && (sex[i]==1) ){
				sex[population] = 0.5*(1-pow(-1,newsex))+1;
				newsex++;
				population++;
			}
			
			age[i]++;
		}
	}
	
	int overThirteen = 0;
	int fertileFemales = 0;
	
	for(i=0; i<n; i++){
		if ( sex[i] == 0 ) break;
		if ( age[i] > 13 ) overThirteen++;
		if ( (age[i]>=13) && (age[i]<=33) && (sex[i]==1) )fertileFemales++;
	}
	
	printf("total population: %d\n", population);
	printf("percentage of population over 13: %g%%\n", (double)overThirteen/population*100);
	printf("total fertile female population: %d\n", fertileFemales);
}