import java.util.Scanner;

public class SecondsToHours {
  public static void main(String[] args) {
    int seconds, hh, mm, ss;
 
    Scanner input = new Scanner(System.in);
    
    System.out.print("Enter the number of seconds: ");
    
    seconds = input.nextInt();
    
    hh = seconds / 3600;
    mm = (seconds % 3600) / 60;
    ss = seconds % 60;
    
    System.out.println("\n" + seconds + " seconds = " 
      + hh + " hours, " + mm + " minutes, and " + ss + " seconds" + "\n");
  }
}