use std::io; fn main() { // 標準入力を受け取る let mut input = String::new(); io::stdin().read_line(&mut input).unwrap(); let x: i32 = (input.trim().parse::().unwrap() * 4.0) as i32; // DP配列の初期化 let mut dp = vec![vec![vec![0i64; 101]; 101]; 601]; dp[0][100][0] = 1; // 6回のステップを繰り返す for _ in 0..6 { let mut ndp = vec![vec![vec![0i64; 101]; 101]; 601]; for sum in 0..601 { for min in 0..101 { for max in 0..101 { if dp[sum][min][max] == 0 { continue; } for i in 0..101 { let min2 = std::cmp::min(min, i); let max2 = std::cmp::max(max, i); let sum2 = sum + i; if sum2 < 601 { ndp[sum2][min2][max2] += dp[sum][min][max]; } } } } } dp = ndp; } // 答えを計算する let mut ans = 0; for sum in 0..601 { for min in 0..101 { for max in 0..101 { if sum as i32 - min as i32 - max as i32 == x { ans += dp[sum][min][max]; } } } } // 結果を出力 println!("{}", ans); }