#!/usr/bin/env python

import fileinput
import sys

args = sys.argv[1:]
if len(args) <= 0:
    pass

n = 1024 * 1024

if len(args) > 0:
    n = int(args[0])

if n >= 0:
    sys.stdout.write(sys.stdin.read(n))
else:
    data = sys.stdin.read()
    sys.stdout.write(data[0:n])

