public static void main(String [] args){
		int sum=0;
		int term=1;
		
		while(fibonacci(term) <=4000000){
			int currentTerm =fibonacci(term);
		if(currentTerm % 2 ==0){
			sum += currentTerm;
		}
			
			term++;
		}
		
		System.out.println(sum);
		
	}