#!/usr/bin/python

import time,sys

if len(sys.argv) < 2:
  print("must provide # of hours back")
  sys.exit()

MSEC_PER_HOUR=1000*60*60

hoursback = int(sys.argv[1])

print(int(time.time()*1000)-(hoursback*MSEC_PER_HOUR))
