n = int(input())print(n.to_bytes((n.bit_length() + 7) // 8, 'big'))
3405691582
b'\xca\xfe\xba\xbe'
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!