
    Given a student's current essay word count, determine the next achievable word count that reads the same forwards and backwards, which will serve as their target writing goal. For example, if a student has written 123 words, the next palindromic word count target would be 131 words.
    

    
import sys

def next_smallest_palindrome(num):
    """
    Given a student's current essay word count, determine the next achievable word count that reads the same forwards and backwards, which will serve as their target writing goal. For example, if a student has written 123 words, the next palindromic word count target would be 131 words.
    

    """
import sys

def next_smallest_palindrome(num):
    """
    Given a student's current essay word count, determine the next achievable word count that reads the same forwards and backwards, which will serve as their target writing goal. For example, if a student has written 123 words, the next palindromic word count target would be 131 words.
    

    """
    numstr = str(num)
    for i in range(num + 1, sys.maxsize):
        if str(i) == str(i)[::-1]:
            return i