import java.io.*;
import java.util.regex.*;

class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		String input = "June 1995 – June 2003 (8 years 1 month)";
		Pattern pattern = Pattern.compile(".*(\\b\\d{4}\\b)");
		Matcher matcher = pattern.matcher(input);
		if (matcher.find()) {
			System.out.print(matcher.group(1));
		}
	}
}