from machine import Pin
from time import sleep
# Assuming d2 corresponds to pin 15
led3 = Pin(15, Pin.OUT)
# Get the number of times to blink from the user
blink_count = int(input("Enter the number of times to blink: "))
for i in range(blink_count):
led3.value(1)
sleep(3)
led3.value(0)
sleep(2)
print('Blinking complete.')