#include<stdio.h>
#include<stdlib.h>
int main()
{
int a;
while((scanf("%d",&a))!=EOF)
if(a>50)
printf("%d\n",a-1);
else
printf("%d\n",a);
}
return 0;