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

import java.util.*;
import java.lang.*;
import java.io.*;

/* 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
	{
		// your code goes here
		long ms = new Date().getTime();
		System.out.println("Current time: " + new Date().toString());
		System.out.println("Current time: " + ms);
		
		long fifteen = 15 * 60 * 1000;
		long newMs = (ms / fifteen) * fifteen + fifteen;
		System.out.println("Calculated time: " + new Date(newMs));
		System.out.println("Calculated time: " + newMs);
	}
}