#!/usr/bin/python
import os, sys
n = int (sys.argv[1])
a = range (100)
if n > 0:
	for t in a[::-1]:
		try:
			f = open ('%02d' % t, 'r')
		except:
			continue
		f.close ()
		os.system ('move %02d %03d' % (t, t + n))
		os.system ('move %02d.a %03d.a' % (t, t + n))
else:
	for t in a:
		try:
			f = open ('%02d' % t, 'r')
		except:
			continue
		f.close ()
		os.system ('move %02d %03d' % (t, t + n))
		os.system ('move %02d.a %03d.a' % (t, t + n))
