#!/usr/bin/perl
use bigint;$_=<>;while($_>70){$_-=2*chop;}print