import struct
import socket
def cidr_to_netmask(cidr):
network, net_bits = cidr.split('/')
host_bits = 32 - int(net_bits)
netmask = socket.inet_ntoa(struct.pack('!I', (1 << 32) - (1 << host_bits)))
return network, netmask
print ("enter IP/Mask: ")
StatIP = input()
print ("enter Gateway: ")
StatGA = input()
cidr_to_netmask(StatIP)
print(StatIP)