import java.util.Scanner;

public class StringContainsDigits {

    // This method checks whether a string has only digits
    public static boolean containsOnlyDigits(String s) {
        // If the string is null or empty, it's not valid → return false
        if (s == null || s.isEmpty()) {
            return false;
        }

        // Loop through every character in the string
        for (int i = 0; i < s.length(); i++) {
            // Character.isDigit() checks if the character is a number (0–9)
            if (!Character.isDigit(s.charAt(i))) {
                return false; // return false if any character is not a digit
            }
        }
        return true; // If all characters are digits, return true
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        // Taking input from the user
        String input = scanner.nextLine();

        // Calling the method
        boolean result = containsOnlyDigits(input);

        // Displaying the output
        System.out.println(result);
    }
}
