Attendance Reward Calculator

Determines the number of possible attendance sequences over N days that would make an employee eligible for a reward.

Write a function that calculates the number of distinct attendance records over `N` consecutive days that would result in an employee receiving a reward. In this organization, two symbols monitor every attendance record: - `'A'`: Represents an absence - `'P'`: Represents presence. An employee becomes eligible for a reward if they have no more than two absences over a particular period. ### Parameters - `days (int)`: The number of consecutive days for an employee's attendance assessment. It is a positive integer ranging from 1 to 20 (1 <= days <= 20). ### Return Value - The function should return an integer representing the count of distinct attendance records that would make an employee eligible for a reward over `N` days. ### Examples ```python # There are seven possible attendance patterns over 3 days: PPP, PPA, PAP, APP, APA, AAP, APA attendance_records(3) # returns 7 attendance_records(4) # returns 11 attendance_records(5) # returns 16 attendance_records(6) # returns 22 ```