Implement a function that calculates the length of the longest palindromic substring that can be formed using the characters of a given string.
Functionality Requirements:
Create a function named longest_palindromic_substring_length that takes a single parameter:
s (a string): This string can contain lowercase alphabetical characters (a-z).
The function should return an integer representing the length of the longest palindromic substring that can be formed using the characters in the input string. A palindrome is a string that reads the same forward and backward.
Input/Output Requirements:
Input: A string s where 1 <= len(s) <= 1000.
Output: An integer that indicates the length of the longest palindromic substring.
Example Scenarios:
If the input string is "abccccdd", the output should be 7 since the longest palindromic substring can be "dccaccd" or any similar arrangement.
If the input string is "a", the output should be 1 since a single character is palindromic.
If the input string is "" (an empty string), the output should be 0 since there are no characters to form a palindrome.
Implementation Notes:
Save the implementation in a file named /app/solution.py.
Ensure that the function adheres to the provided signature.
Constraints:
Only characters from 'a' to 'z' will be considered in the input string.
Mind the performance, as the function may need to handle strings close to the maximum length efficiently.