public static void main(String[] args) {
		
		ArrayList<Integer> arr = new ArrayList<Integer>();
		
		arr.add(1);
		arr.add(1);
		int running = 1;

		int result = 0;
		
		while(true)
		{
			if(arr.get(running-1) + arr.get(running) < 4000000)
			{
				arr.add(arr.get(running-1) + arr.get(running));
				if(arr.get(running+1) % 2 == 0)
					result += arr.get(running+1);
				running++;
			}
			else
			{
				break;
			}
		}
		System.out.println(result);
	}