// Arup Guha
// 2/4/2017
// Solution to AP Review Problem: Deficient, Perfect, Abundant Numbers.

import java.util.*;

public class perfect {
	
	public static void main(String[] args) {
		
		// Get user input.
		Scanner stdin = new Scanner(System.in);
		System.out.println("Enter a positive integer.?");
		int n = stdin.nextInt();
		
		int sumPropDiv = 0;
		
		// Add up all proper divisors.
		for (int i=1; i<=n/2; i++)
			if (n%i == 0)
				sumPropDiv += i;
		
		// Print out the sum of the proper divisors.		
		System.out.println("The sum of the proper divisors of "+n+" is "+sumPropDiv);
		
		// Print out the appropriate message.
		if (sumPropDiv < n)
			System.out.println("Your number is deficient.");
		else if (sumPropDiv == n)
			System.out.println("Your number is perfect.");
		else
			System.out.println("Your number is abundant.");
	}
}