#!/usr/bin/env python3
"""Auto-generated by AGI Loop cycle #1243
Task: , and the user's instructions were to suggest ONE specific Python programming task for Eden, starting with "Write a Python function that" and being testable by running it, returning ONLY the task.

Ok
Generated: 2026-02-13T01:32:17.998268
"""

def calculate_months_to_retirement_milestone(current_savings, monthly_contribution, annual_interest_rate, target_milestone):
    months = 0
    monthly_interest_rate = annual_interest_rate / 12
    while current_savings < target_milestone:
        current_savings += monthly_contribution
        current_savings *= (1 + monthly_interest_rate)
        months += 1
    return months

if __name__ == '__main__':
    result = calculate_months_to_retirement_milestone(10000, 500, 0.05, 50000)
    print(f"Months needed: {result}")