/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.Date;
import java.text.SimpleDateFormat;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		SimpleDateFormat formato = new SimpleDateFormat ("dd-MM-yyyy HH:mm:ss Z");
		String data1 = "22-07-2017 00:00:00 +0100";
		String data2 = "22-07-2017 18:57:17 +0100";
		
		Date d1 = formato.parse(data1);
		Date d2 = formato.parse(data2);

		System.out.println(d1.compareTo(d2));
	}
}