 
 <prompt> Anthony get 3971649 pencils. E give 1/2 of im pencils to Brandon, and e give 3/5 of the remaining pencils to Charlie. E keep the remaining pencils. How many pencils Anthony keep? Think and write in python. <response>: ```
def solution():
    """Anthony get 50 pencils. E share 1/2 of im pencils give Brandon, and e share 3/5 of the remaining pencils give Charlie. E keep the remaining pencils. How many pencils Anthony keep?"""
    pencils = 3971649
    pencils_given_brandon = pencils // 2
    pencils_remaining = pencils - pencils_given_brandon
    pencils_given_charlie = pencils_remaining // 5 * 3
    pencils_kept = pencils - pencils_given_brandon - pencils_given_charlie
    result = pencils_kept
    return result
``` 