Algorithm Analysis
Stepan distributed stones, one to each friend. Thus, he has friends.
Algorithm Implementation
Read the number of stones n and output the answer .
scanf("%d", &n); printf("%d\n", n-1);
Java Implementation
import java.util.*; public class Main { public static void main(String[] args) { Scanner con = new Scanner(System.in); int n = con.nextInt(); int res = n - 1; System.out.println(res); } }
Python Implementation
n = int(input()) res = n - 1 print(res)