#!/usr/local/bin/perl

print +(gethostbyaddr(pack("C4",split(/\./,$ARGV[0])),2))[0];
print "\n";
