#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 30 18:35:05 2017

@author: brendontucker

feel like generating binary numbers should easily be a recursive problem...

jk jk these are all covered by built in functions

Codefights requires this to be a oneliner?
"""

n = 37
k = 3

#binaryN = list(bin(n))
##binaryN = binaryN[2:]
#binaryN[-k] = '0'
#binStr = ''.join(binaryN)
#binInt = int(binStr, 2)
#
((n>>k)<<k) + n % (1<<(k-1))

'''found that solution on the message boards...'''