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

class Main
{
    public static void main (String[] args) throws java.lang.Exception
    {
        Scanner cin = new Scanner(System.in);
        double d = Double.parseDouble(cin.nextLine());
        System.out.println(String.format(
               "%1$te дня %1$tH час(а/ов) %1$tM минут(а/ы)",
               new GregorianCalendar(0, 0, 0, 0, 0,
               (int) (d * 24 * 3600))));
    }
}